1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104.

Slides:



Advertisements
Similar presentations
When is Orientated Programming NOT? Mike Fitzpatrick.
Advertisements

4. Object-Oriented Programming Procedural programming Structs and objects Object-oriented programming Concepts and terminology Related keywords.
Object-Oriented Design – Key Concepts Version 1.1 of : added learning objectives CompSci 230 Software Construction.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
1 Object Oriented Programming Development - Week 5 z By: Marc Conrad University of Luton z z Room: D104.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Derived Classes in C++CS-2303, C-Term Derived Classes in C++ CS-2303 System Programming Concepts (Slides include materials from The C Programming.
Introduction to Object Oriented Programming Java.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction To System Analysis and Design
TCS2411 Software Engineering1 Object-Oriented Analysis and Design “A system of objects interacting to perform the given tasks”
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Object-oriented concepts.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
OBJECT ORIENTED PROGRAMMING
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
UML and Object Oriented Concepts
1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104.
Object Oriented Software Development
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
Object Oriented Programming Development
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
Introduction to Object-oriented programming and software development Lecture 1.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
An Object-Oriented Approach to Programming Logic and Design
Sadegh Aliakbary Sharif University of Technology Fall 2011.
1. 2 Object-Oriented Concept Class & Object Object-Oriented Characteristics How does it work? Relationships Between Classes Development Tools Advantage.
Object-Oriented Analysis and Design An Introduction.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Stephenson College DP 96 1 Object-Orientation by Derek Peacock.
Marc Conrad, University of Luton1 Abstract Classes – pure computer science meets pure mathematics. The Beauty of Implementing Abstract Structures.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
1 Object Oriented Programming Development - Week 3 z By: Marc Conrad University of Luton z z Room: D104.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
Salman Marvasti Sharif University of Technology Winter 2015.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Lecturer: Nguyen Thi Hien Software Engineering Department Home page: hienngong.wordpress.com Chapter 2: Language C++
1 Inheritance Inheritance is a natural way to model the world in object-oriented programming. It is used when you have two types of objects where one is.
Object-Oriented Programming (Review) CS 123 Key OOP Concepts zObject, Class zInstantiation, Constructors zEncapsulation zInheritance and Subclasses zAbstraction.
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
Introduction to Object Oriented Programming Lecture-3.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
CSE202 Object Oriented Programing
Object Oriented Programming Development
CS3340 – OOP and C++ L. Grewe.
Object Oriented Programming
Object Oriented Concepts -I
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
C++.
OOP vs Structured Programming
Object Oriented Software Development CIS 50-3
CS565 Advanced Software Development
Derived Classes in C++ Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2nd edition,
CSE Object Oriented Programing
BCA-II Object Oriented Programming using C++
Object-Oriented PHP (1)
Presentation transcript:

1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104

2 What is Object Oriented Programming? An object is like a black box. The internal details are hidden. z Identifying objects and assigning responsibilities to these objects. z Objects communicate to other objects by sending messages. z Messages are received by the methods of an object

3 What is an object? zTangible Things as a car, printer,... zRoles as employee, boss,... zIncidents as flight, overflow,... zInteractions as contract, sale,... zSpecifications as colour, shape, …

4 So, what are objects? zan object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain. Or zAn "object" is anything to which a concept applies. Etc.

5 Why do we care about objects? zModularity - large software projects can be split up in smaller pieces. zReuseability - Programs can be assembled from pre-written software components. zExtensibility - New software components can be written or developed from existing ones.

Example: The Person class #include class Person{ char name[20]; int yearOfBirth; public: void displayDetails() { cout << name << " born in " << yearOfBirth << endl; } //... }; private data public processes

7 The two parts of an object Object = Data + Methods or to say the same differently: An object has the responsibility to know and the responsibility to do. = +

8 Basic Terminology zAbstraction is the representation of the essential features of an object. These are ‘encapsulated’ into an abstract data type. zEncapsulation is the practice of including in an object everything it needs hidden from other objects. The internal state is usually not accessible by other objects.

9 Basic Terminology: Inheritance zInheritance means that one class inherits the characteristics of another class. This is also called a “is a” relationship: A car is a vehicle A teacher is a person A dog is an animal

10 Basic Terminology: Polymorphism zPolymorphism means “having many forms”. It allows different objects to respond to the same message in different ways, the response specific to the type of the object. E.g. the message displayDetails() of the Person class should give different results when send to a Student object (e.g. the enrolment number).

11 Basic Terminology: Aggregation zAggregation describes a “has a” relationship. One object is a part of another object. zWe distinguish between composite aggregation (the composite “owns” the part) and shared aggregation (the part is shared by more then one composite). A car has wheels.

12 Basic Terminology: Behaviour and Messages zThe most important aspect of an object is its behaviour (the things it can do). A behaviour is initiated by sending a message to the object (usually by calling a method).

13 The two steps of Object Oriented Programming zMaking Classes: Creating, extending or reusing abstract data types. zMaking Objects interact: Creating objects from abstract data types and defining their relationships.

14 Historical Notes zC++ owes most to C. Other ancestors are Simula67 and Algol68. zFirst versions of C++ in 1980 under the name “C with classes”. Since 1983 the name C++ is used. z1990: ANSI/ISO 9899 defines a standard for C z1998: ISO/IEC specifies the standard for C++ C

15 C++ and C zC is a subset of C++. Advantages: Existing C libraries can be used, efficient code can be generated. But: C++ has the same caveats and problems as C (e.g. pointer arithmetic,…). zC++ can be used both as a low level and as a high level language. We focus on the high level aspects.

16 C++ and Java zJava is a full object oriented language, all code has to go into classes. zC++ - in contrast - is a hybrid language, capable both of functional and object oriented programming. So, C++ is more powerful but also more difficult to handle than Java.

17 Websites zA C++ online tutorial: zThe C++ FAQ: zThe homepage of Bjarne Stroustrup, the inventor of C++: And many, many more!