Upload
ramy-f-radwan
View
261
Download
1
Embed Size (px)
Citation preview
Pimp UR Knowledge II
Intro. To programming using Java
SESSION NO.1
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.
What Is The Meaning Of Programming?
Algorithms
“ Algorithms are a set of steps of a well written recipe “
InputsProcessing
Algorithm
Outputs And
Desired Goal
Why Java …..
JDK, JRE And IDE
• Java Development Kit
• Java Runtime Environment
• Integrated Development Environtment
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}
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
JAVA SYNTAX
Symbols that represents logical operations:
• ! not logical negation
• && and logical conjunction
• || or logical disjunction
**Usually used in If Statements
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 ;
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);
SUMMING UP QUIZ
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”