session 1 of programming

15
Pimp UR Knowledge II Intro. To programming using Java SESSION NO.1

Upload: ramy-f-radwan

Post on 13-Apr-2017

264 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Session 1 of programming

Pimp UR Knowledge II

Intro. To programming using Java

SESSION NO.1

Page 2: Session 1 of programming

TODAY WE WILL TALK ABOUT …

• 0.0- Introduction about the course.

• 1.1- What is the meaning of programming.

• 1.2- Algorithms?.

• 1.3- Why Java?

• 1.4- Java tools(JDK , JRE , IDE) && Syntax.

• 1.5- Session’s Quiz and report.

• 1.6-Question time.

Page 3: Session 1 of programming
Page 4: Session 1 of programming

What Is The Meaning Of Programming?

Page 5: Session 1 of programming

Algorithms

“ Algorithms are a set of steps of a well written recipe “

InputsProcessing

Algorithm

Outputs And

Desired Goal

Page 6: Session 1 of programming

Why Java …..

Page 7: Session 1 of programming

JDK, JRE And IDE

• Java Development Kit

• Java Runtime Environment

• Integrated Development Environtment

Page 8: Session 1 of programming

Java Syntax

• Types:

Kinds of values that can be stored and manipulated:

• boolean: Truth value (true or false).

• int: Integer (0, 1, -47).

• double: Real number (3.14, 1.0, -2.1).

• String: Text (“hello”, “example”).

• Array: Array is and object of any of the previous data types

Form:Type name;

Type name = value ;

Array’s Form:

Type name[] = new Type[no. of elements];

Type name[] = {E,L,E,M,E,N,T,S}

Page 9: Session 1 of programming

Java Syntax

• Operators:

Symbols that perform simple computations

• Assignment: =

• Addition: +

• Subtraction: -

• Multiplication: *

• Division: /

• Remainder %

Note:

Dependency of the

Mathematical

computations is same as

that dependency of

Equations in Math.

x(t) = 0.5 × at2 + vit + xi

Page 10: Session 1 of programming

JAVA SYNTAX

Symbols that represents logical operations:

• ! not logical negation

• && and logical conjunction

• || or logical disjunction

**Usually used in If Statements

Page 11: Session 1 of programming

Java Syntax

Data input:

• First we build an OBJECT from the Class “Scanner”.

• Then we use this object to read the data input from the user.

Form:Scanner name = new Scanner (System.in);

Type name = name.nextType ;

Page 12: Session 1 of programming

Java Syntax

Data Output:

• Use the Form :

• Sentences needs to be in Quotations, Variables needn’t.

Form:System.out.print(“ sentence ” + variable);

Or

System.out.print(“ sentence ” + variable);

Page 13: Session 1 of programming

SUMMING UP QUIZ

Page 14: Session 1 of programming

TASKS AND REPORT

• Install the IDE, JDK, JRE

• Make your first app on eclipse- Be innovative by using your resource

knowledge -. Send it to my e-mail before the next session.

• Read further readings on: Java and Other common languages

• Prepare a presentation about “OOP Programming”

Page 15: Session 1 of programming