Presentation is loading. Please wait.

Presentation is loading. Please wait.

INM205 Object Oriented Programming in JAVA Dr. Michael Casey Department of Computing.

Similar presentations


Presentation on theme: "INM205 Object Oriented Programming in JAVA Dr. Michael Casey Department of Computing."— Presentation transcript:

1 INM205 Object Oriented Programming in JAVA Dr. Michael Casey Department of Computing

2 INM205 Syllabus WeekDateContentChapters 129/09JAVA and object concepts: classes, instances and invocation1 206/10Anatomy of objects: types, expressions and scope. Assignment 12-3 313/10 ?Polymorphism: Shapes and Simple Graphics4 420/10 ?Control structures: conditional behaviour5 527/10Iteration: Assignment 26 603/11 READING WEEK, NO LECTURE9,10,11,12 710/11Interfaces, Inheritance9,10,11,12 817/11Collections, Exceptions and Streams13,16 924/11Graphical User Interface (The SWING Library)13,15 1001/12Developing Applications 1 1108/12Developing Applications 2 1215/12Exam Prep.

3 What this module is about Object-oriented programming languages what they are why they are the way they are how to use them Java used as language to illustrate ideas software design not the main topic: see Object-Oriented Analysis & Design (term 2)

4 What is a Computer ? Central processing unit Memory Peripherals Executes very simple instructions Executes instructions very rapidly General purpose device Programs describe specific actions

5 Computer Architecture

6

7 What is a Program ? CPU Data Bus Instructions 21 40 16 100...

8 What is a Program ? CPU Data Bus Instructions 21 40 16 100... Machine Code: specific to a machine (e.g. CPU)

9 What is a Program ? 21 40 16 100... iload intRate bipush 100 if_icmpgt intError Assembly Language: specific to a machine

10 What is a Program ? 21 40 16 100... iload intRate bipush 100 if_icmpgt intError Assembly Language: specific to a machine if (intRate>100)...

11 What is a Program ? High-level Language: General Purpose (Not machine specific) if (intRate>100)... iload intRate bipush 100 if_icmpgt intError

12 The JAVA Programming Language Clean Object-Oriented implementation Safe (for beginners) Platform independent “write once, run anywhere” Virtual Machine Rich library Widely-Used for Internet / Business / Academic

13 Classes and Objects class –a set of objects that support a specified set of operations (methods). Analogy: a type of machine, with buttons, levers, displays, etc. object –an instance of a class: some data, usually hidden from the rest of the program, and manipulated by the specified methods. Analogy: a particular machine of that type.

14 Car Class Class

15 Car Class Instance

16 Car Class Instance Fields

17 Car Class Two Instances

18 Car Class Two Instances One Class

19 Car Class JamesBond car object instance JamesBond car instance fields

20 Student LabClass Class Two Classes LabClass Student Dependency

21 Student LabClass Class identifier student1

22 Student LabClass Class instance fields

23 Student LabClass Class Methods

24 Shape Classes Four Classes

25 Shape Classes One instance

26 Shape Classes Instance Methods

27 Shape Classes Methods Output (Canvas)

28 BlueJ and JAVA

29 UML Class Diagram

30 BlueJ and JAVA Object Instances

31 BlueJ and JAVA Source Code Editor

32 JAVA Programming Flow Chart

33

34

35

36

37

38

39 Summary What is a Computer ? CPU, Memory, Storage, I/O What is a Program ? machine code, assembly language, high level language Objects model things in the world classes vs. object instances instance fields, methods The JAVA Programming Flowchart editing, compiling, running (interpreter)


Download ppt "INM205 Object Oriented Programming in JAVA Dr. Michael Casey Department of Computing."

Similar presentations


Ads by Google