Lecture 15 - Lecture 15 Oct 28th , 02 Object Oriented...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 15 Oct 28 th , 02
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Oriented Programming Objects – Pens, Cars, Birds, Animals etc Objects have attributes like color, shape, size etc. .. Objects exhibit behavior or have certain functionalities eg: Pens write, birds fly, eat etc. ...
Background image of page 2
Pen Example We have a class of pens. A single pen object has attributes like color, shape, size etc. .. The pen is used to write.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Class in C++ A class defines both data and functions. Data refers to attributes of an object. Functions refer to action or behavior of an object. A class forms the basic blue print for objects to be created with attributes and functions.
Background image of page 4
Sections of a C++ program It has 3 sections 1. Class declaration. 2. Class implementation. 3. main() function.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Class construction in C++ Programs // class declaration section class class_name { data members (instances and variables) function members }; // class implementation // main function
Background image of page 6
Class Date { private:
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 07/06/2011.

Page1 / 11

Lecture 15 - Lecture 15 Oct 28th , 02 Object Oriented...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online