1. Object Oriented Programming
Wed, 10.00-12.30 -@A.602 (Lect)
Wed, 10.00 – 12.30 -@Puskom (Lab)
Prof. Dr. –Ing. Kalamullah Ramli
1
2. Objectives
Understand Object Oriented Design
Paradigm
Understand principles of and best
practice on developing and analysing
Object Oriented System Software
Capable of designing, initializing and
implementing Object Oriented System
Software
2
3. Syllabus of Course
W Topics Date Lect Task
1Introduction to OOP 31-Agust KLM reading Chap 2, Chap 3, Chap 4 (Cisco-Sun)
2Object Oriented Principles 07-Sep KLM reading Chap 5, Chap 6, Chap 7 (Cisco-Sun)
3Inheritance 14-Sep reading Chap 8 (Cisco-Sun)
4Polymorphism 28-Sep KLM review reading Chap 2 to Chap 8
5Java Packages, AWT 05-Okt KLM reading Chap 9, Chap 10 (Cisco-Sun)
6Introduction to Java Networking, Applets, Graphics 12-Okt reading Chap 11 (Cisco-Sun)
Mid-Test 19-23-Okt
7 26-Okt KLM exercise, reading Chap 12 (Cisco-Sun)
8 Lab Exercises: setting, initializing, implementing Object 02-Nop KLM exercise, reading Chap 13 (Cisco-Sun)
Oriented Applications
9 09-Nop KLM exercise, reading Chap 14 (Cisco-Sun)
10 16-Nop KLM exercise, reading Chap 15 (Cisco-Sun)
11Project Explanation 23-Nop KLM Developing
12Project Explanation 30-Nop KLM Developing
Final-Test 07-21-Des
3
8. Central Processing Unit (CPU)
Persistent Data Storage
◦ Hard Drive, CD, Diskette, ROM
Volatile Storage
◦ Random Access Memory (RAM)
Peripherals
◦ Mouse, Keyboard, Screen, etc
9. Instructions that tell the hardware
what to do
Three ways to obtain software
◦ Buy pre-written software
◦ Modify pre-existing software
◦ Write the software
10. Tools for the user
Usually a collection of programs
Provide a user interface
◦ Accept input
◦ React to requests
Examples: Microsoft Office, Netscape
Navigator
11. Program that controls the computer
hardware
Provides a consistent way for
applications to access the hardware
Many Operating Systems exist, mostly
incompatible with each other
Applications must be written
specifically for the target Operating
System
12. Digital CPUs require binary instructions
Early computers were programmed with
electrical switches
Very difficult to write programs
Early languages used mnemonics that
were translated to binary for the CPU
Higher-
Higher-level languages allow the
programmer to ignore the details
13. Early high-level languages were procedural
Programs were a list of sequential steps
Programmer had to think like the computer
Object-oriented Programming (OOP) uses
general purpose components
Components are then assembled in to an
application
14. Components are called ‘Objects
Objects’
Objects
Object perform specific functions
Objects interact by sending & receiving
messages
Programmer is focused on coordinating the
object interaction
Closely models human problem-solving
problem-
15. Punctuation – Symbols used
Vocabulary – The languages keywords
Identifiers – Used to reference data
Operators – Symbols representing commands
Syntax – Rules for combining the language’s
elements
16. Compiled – The program is translated in to
the CPU’s binary language once it is
completed
Interpreted – The individual instructions in
the program are translated immediately
before they are executed
17. Originally designed for consumer devices
Had to be small, simple, portable
small simple
Ideal for use over the Internet
18.
19. Java programs written as text files
Java compiler creates a program file
consisting of ‘Byte Code
Byte Code’
The byte-code file is sent to the target
computer, which has a Java Virtual Machine
(JVM)
The JVM ‘interprets the byte-code, one
interprets’
interprets
instruction at a time
A Separate JVM is required for each
Operating System & CPU
20.
21. Create Java Programs with a text editor or
Integrated Development Environment (IDE)
Use a compiler to create the ‘byte-code’ class
files (Such as JDK)
A Java Virtual Machine (JVM on the target
JVM)
JVM
computers
22. /**
* A Java Program
* @author: Student
Comments
*/
// This program will say hello Class definition
public class sayHello { Data & methods
public static void main(String args[]) {
String name = “Student”;
int number = 1; The ‘main’ method
System.out.println(“Hello”);
System.out.println(name); Punctuation
System.out.println(“Your lucky number is “ + number);
}
}