Why java and how it works chapter 1
Transcript of Why java and how it works chapter 1
-
8/12/2019 Why java and how it works chapter 1
1/25
1Spring 2014
Java ProgrammingCOSC 450
Dr. Mohamad EL ABED
-
8/12/2019 Why java and how it works chapter 1
2/25
Course text book & software
Paul Deitel and Harvey Deitel, Java How to Program, 9 / e
NetBeans IDE (http://netbeans.org/)
2
Office: Block I208
Office hours: Wednesday 02:0004:00
E-mail: [email protected]
Evaluation profile Marks
Attendance, Assignments and Lab 20%
1 Mid. Exam 20%
2 Projects 30%
Final Exam 30%
-
8/12/2019 Why java and how it works chapter 1
3/25
Course objectives
3
Concept of Object-Oriented ProgrammingOOP
Use of a high level programming language (Java) for the
systematic development of programs
Data structures: Stacksand Queues
To build desktop applications using the design principles of
Graphical User Interface (GUI)
Understand the notion of multithreading
Introduction to Weka Libraryand machine learning algorithms
-
8/12/2019 Why java and how it works chapter 1
4/25
Syllabus
4
I. Introduction to Java Applications
II. Control Statements
III. Arrays in Java
IV. Documenting with Javadoc
V. Introduction to Object-Oriented Programming (OOP)
VI. Object-Oriented Programming: Inheritance and Polymorphism
VII. Graphical User Interface (GUI) Components
VIII. Introduction to Java Applets
IX. Java Multithreading
X. Introduction to Weka Library
-
8/12/2019 Why java and how it works chapter 1
5/25
5
Chapter I
Introduction to Java Applications
Java ProgrammingCOSC 450
Dr. Mohamad EL ABED
-
8/12/2019 Why java and how it works chapter 1
6/25
Chapter I - Objectives
6
To be able to write simple Java applications
To be able to use input and output statements
To be able to use arithmetic operators
To be able to write decision-making statements
To be able to use relational and equality operators
-
8/12/2019 Why java and how it works chapter 1
7/25
Chapter I - Outline
7
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
8/25
History of Java
8
Java is developed by James Gosling atSun Microsystems
and released in 1995
Java provides the capabilities for Object-Oriented
Programming (OOP)
C,C++andJava are widely used in real life applications
-
8/12/2019 Why java and how it works chapter 1
9/25
Chapter I - Outline
9
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
10/25
Why Java?
10
Portable-Platform independentprogramming language
Pointer denialreduces chances of virulent programs
corrupting host
Provides the capabilities of Object-Oriented Programming
(OOP)
Designed for network programming (i.e., sockets)
Multi-threaded(i.e., multiple simultaneous tasks)
-
8/12/2019 Why java and how it works chapter 1
11/25
How it Works?
11
-
8/12/2019 Why java and how it works chapter 1
12/25
Chapter I - Outline
12
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
13/25
First Program in Java: Printing a Line Text
13
Output
-
8/12/2019 Why java and how it works chapter 1
14/25
Chapter I - Outline
14
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
15/25
Escape Sequences
15
-
8/12/2019 Why java and how it works chapter 1
16/25
Chapter I - Outline
16
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
17/25
Displaying a Text in a Dialog Box
17
Output
-
8/12/2019 Why java and how it works chapter 1
18/25
Chapter I - Outline
18
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
19/25
Another Java Application: Adding Integers
19
-
8/12/2019 Why java and how it works chapter 1
20/25
Another Java Application: Adding Integers
20
Output
-
8/12/2019 Why java and how it works chapter 1
21/25
Chapter I - Outline
21
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
22/25
Arithmetic
22
-
8/12/2019 Why java and how it works chapter 1
23/25
Chapter I - Outline
23
History of Java
Why Java and How it Works?
First Program in Java: Printing a Line of Text
Escape Sequences
Displaying Text in a Dialog Box
Another Java Application: Adding Integers
Arithmetic
Decision Making: Equality and Relational Operators
-
8/12/2019 Why java and how it works chapter 1
24/25
Decision Making: Equality and Relational Operators
24
-
8/12/2019 Why java and how it works chapter 1
25/25
25
End of Chapter I