Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 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. 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. 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
  4. 4. References Deitel, “ Cisco & Sun, “Java Programming”, Cisco Networking Academy 4
  5. 5. Lecture 1 Introduction to Object Oriented Programming 5
  6. 6. Hardware components Software and programming Introduction to Java Integrated Development Environment (IDE IDE) IDE
  7. 7. Central Processing Unit (CPU) Persistent Data Storage ◦ Hard Drive, CD, Diskette, ROM Volatile Storage ◦ Random Access Memory (RAM) Peripherals ◦ Mouse, Keyboard, Screen, etc
  8. 8. Instructions that tell the hardware what to do Three ways to obtain software ◦ Buy pre-written software ◦ Modify pre-existing software ◦ Write the software
  9. 9. Tools for the user Usually a collection of programs Provide a user interface ◦ Accept input ◦ React to requests Examples: Microsoft Office, Netscape Navigator
  10. 10. 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
  11. 11. 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
  12. 12. 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
  13. 13. 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-
  14. 14. Punctuation – Symbols used Vocabulary – The languages keywords Identifiers – Used to reference data Operators – Symbols representing commands Syntax – Rules for combining the language’s elements
  15. 15. 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
  16. 16. Originally designed for consumer devices Had to be small, simple, portable small simple Ideal for use over the Internet
  17. 17. 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
  18. 18. 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
  19. 19. /** * 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); } }