BCA-II Object Oriented Programming using C++

Slides:



Advertisements
Similar presentations
OBJECT-ORIENTEDNESS. What is Object-Orientedness? model system as a collection of interacting objects O-O Modelling  O-O Programming ► similar conceptual.
Advertisements

Object-Oriented Design – Key Concepts Version 1.1 of : added learning objectives CompSci 230 Software Construction.
1 Class Vehicle #include #define N 10../.. 2 Class Vehicle class vehicle { public: float speed; char colour[N+1]; char make[N+1];
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:
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
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.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
OBJECT ORIENTED PROGRAMMING
BACS 287 Basics of Object-Oriented Programming 1.
1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104.
Object Oriented Software Development
Object Oriented Programming Development
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.
Object Oriented Programming Lecturer: Andreas P. Adi
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
OBJECT-ORIENTEDNESS KCDCC. WHAT IS OBJECT-ORIENTEDNESS? KCDCC model system as a collection of interacting objects O-O Modelling O-O Programming similar.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
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
Stephenson College DP 96 1 Object-Orientation by Derek Peacock.
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.
Abstraction ADTs, Information Hiding and Encapsulation.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
Salman Marvasti Sharif University of Technology Winter 2015.
1 Object Oriented Programming Development z By: Marc Conrad University of Luton z z Room: D104.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science)
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
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.
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.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Game Programming II Concept.
Object Oriented Programming Development
Object-Oriented Programming Concepts
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
CHAPTER 5 GENERAL OOP CONCEPTS.
Object Oriented Programming F3031
Object Oriented Programming
Object Oriented Concepts -I
OBJECT ORIENTED PROGRAMMING overview
Object Oriented Concepts
CSC 205 Programming II Lecture 2 Subclassing.
System models October 5, 2005.
Procedural Programming
Object Oriented Software Development CIS 50-3
SYS466 Domain Classes – Part 1.
CIS601: Object-Oriented Programming in C++
Workshop for Programming And Systems Management Teachers
Basic OOP Concepts and Terms
Software Analysis.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Object-Oriented PHP (1)
Object Oriented Design & Analysis
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Presentation transcript:

BCA-II Object Oriented Programming using C++

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

What is an object? Tangible Things as a car, printer, ... Roles as employee, boss, ... Incidents as flight, overflow, ... Interactions as contract, sale, ... Specifications as colour, shape, …

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

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

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

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. = +

Basic Terminology Abstraction is the representation of the essential features of an object. These are ‘encapsulated’ into an abstract data type. Encapsulation 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.

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

Basic Terminology: Polymorphism Polymorphism 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).

Basic Terminology: Aggregation Aggregation describes a “has a” relationship. One object is a part of another object. We 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.

Basic Terminology: Behaviour and Messages The 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).

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