Click here to load reader

Oop Basics

  • View

  • Download

Embed Size (px)

Text of Oop Basics

Object Oriented Programming DevelopmentBy: Marc Conrad University of Luton Email: [email protected]uk Room: D1041

What are we doing today?Introduction of:the lecturer Objects Basic Terminology C++ the module


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 Roles Incidents Interactions Specifications as a car, printer, ... as employee, boss, ... as flight, overflow, ... as contract, sale, ... 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.5

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 #include class Person{ private char name[20]; data int yearOfBirth; public: void displayDetails() { cout