OO (Object Oriented) Programming Chapter 21 IB103 Week 12.

Slides:



Advertisements
Similar presentations
General OO Concepts Objectives For Today: Discuss the benefits of OO Programming Inheritance and Aggregation Abstract Classes Encapsulation Introduce Visual.
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Chapter 1 Object-Oriented System Development
Introduction To System Analysis and Design
1 CS1001 Lecture Overview Homework 3 Homework 3 Project/Paper Project/Paper Object Oriented Design Object Oriented Design.
1 Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 8.1 – 8.5.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Objects First with Java A Practical Introduction using BlueJ
Basic OOP Concepts and Terms
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
CO320 Introduction to Object- Oriented Programming Michael Kölling 3.0.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Inheritance. © 2004 Pearson Addison-Wesley. All rights reserved 8-2 Inheritance Inheritance is a fundamental object-oriented design technique used to.
2.5 OOP Principles Part 1 academy.zariba.com 1. Lecture Content 1.Fundamental Principles of OOP 2.Inheritance 3.Abstraction 4.Encapsulation 2.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Lecture 7: Objects and Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
Abstraction, Inheritance, and Polymorphism in Java.
CPS Today’s topics Java Language Inheritance Upcoming Electric Circuits (not in text) Reading Great Ideas, Chapters 5.
Introduction to Object-oriented programming and software development Lecture 1.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
An Object-Oriented Approach to Programming Logic and Design
Specialization and Inheritance Chapter 8. 8 Specialization Specialized classes inherit the properties and methods of the parent or base class. A dog is.
Introduction To System Analysis and Design
CSC 211 Introduction to Design Patterns. Intro to the course Syllabus About the textbook – Read the introduction and Chapter 1 Good attendance is the.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
© S Ramakrishnan, Monash University oops1.ppt 1 Object-Oriented Programming Systems SFT3021 Semester Lecturer: Sita Ramakrishnan
Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Inheritance Chapter 10 Programs built from objects/instances of classes An O.O. approach – build on earlier work. Use classes in library and ones you have.
Date : 02/03/2014 Web Technology Solutions Class: OOP PHP, Design Patterns and CRUD.
Abstraction ADTs, Information Hiding and Encapsulation.
8. Inheritance “Is-a” Relationship. Topics Creating Subclasses Overriding Methods Class Hierarchies Abstract Class Inheritance and GUIs The Timer Class.
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 5.
Chapter 8 Specialization aka Inheritance. 2 Inheritance  Review of class relationships  Uses – One class uses the services of another class, either.
Object-Oriented Principles Applications to Programming.
Chapter 8 Inheritance. 2  Review of class relationships  Uses – One class uses the services of another class, either by making objects of that class.
OO in Context Lecture 13: Dolores Zage. Confused about OO Not alone, there is much confusion about OO many programs are claimed to be OO but are not really.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Software Construction Lab 05 Abstraction, Inheritance, and Polymorphism in Java.
Object-Oriented Design
Object-Oriented Programming Concepts
Objects First with Java A Practical Introduction using BlueJ
Web Technology Solutions
Object Oriented Concepts -I
Week 4 Object-Oriented Programming (1): Inheritance
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Object Oriented Analysis and Design
Chapter 10 Thinking in Objects
Chapter 10 Thinking in Objects
MSIS 670 Object-Oriented Software Engineering
Object-Oriented Programming
Object-Oriented Programming
Objects First with Java A Practical Introduction using BlueJ
Object-Oriented Programming
Object-Oriented Programming
Objects First with Java A Practical Introduction using BlueJ
Object Oriented Analysis and Design
Object-Oriented Programming
Object Oriented Design & Analysis
Object Oriented Programming(OOP)
Presentation transcript:

OO (Object Oriented) Programming Chapter 21 IB103 Week 12

A method of Design, (make the major decisions first when designing programs) OO object oriented programs “Balloon” as an example, a simulation of a balloon Principles of OOP 1. Encapsulation (Chapter 9) 2. Inheritance (Chapter 11) 3. Polymorphism

Encapsulation …group related information together and protected from the outside (world) Private = protected or Open = open to the world

Inheritance Use classes repeatedly Reuse parts of existing classes when possible

Polymorphism Same methods used with others, multiple implementations

Design problems Need to identify objects. An approach to problem solving Simulation and Modeling Build a software model of something in the real world Identify the object(s) in the problem Model them as objects Ignore irrelevant detail Specification = what is required Design = how it will be accomplished

Model – view - controller An example: A cars engine (model) the observer = you gas pedal (controller) speedometer (some dial or gage) i.e. GUI What user adjusts with (a scrollbar (controller) as an example)

A Balloon example Model- car engine vs. Balloon View – speedometer vs. Circle Controller – steering wheel vs. change position of Balloon (left/right, up/down)

Hierarchy An old example “Sphere” class as the parent and Orb, or Circle, or marble or whatever as child. Many other sub classes possible Analyze the specifications of what you are to model (design) Write in pseudocode before using Java

Case study in design “One Armed Bandit” example “Slotmachine”: “Actions” Display Go Query Stop Reuse the components that your program can inherit

Relationships “is a” vs. “has a” Is a = inheritance (java “extends”) from parent class Has a = (java “new”) an object Needs a = utility (java various methods) need of another object, may pass in a parameter)

Reuse components that your program can inherit Save time, money Tested before Build library Specific to organisation