Chapter8 - Chapter 8 OBJECT ORIENTED PROGRAMMING I SOME...

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

View Full Document Right Arrow Icon
Chapter 8 OBJECT ORIENTED PROGRAMMING - I
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 SOME DEFINITIONS OOP - Object Oriented Programming OBJECT - A collection of descriptive data and the functions to manipulate the data, all in a self- contained package. CLASS - The declaration statement that C++ uses to define objects. In a class statement you define the data members and member functions of an object. ENCAPSULATION - The binding data & methods (variables & functions) to create an object.
Background image of page 2
3 SOME DEFINITIONS DATA ABSTRACTION - The hiding of the specific form that the data of an object is stored from the user of the object. The user of an object uses the object via the member functions and does not care how the hidden or private data is stored. CONSTRUCTOR - A function that creates an instantiation of an object and assigns values to its data members. In C++, constructor functions have the same name as the object. DESTRUCTOR - A function that releases dynamic memory of an instantiated object. A destructor is not required if the object did not allocate dynamic memory. In C++, destructor function names start with a tilda, “~”, and end with the name of the object.
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 POINT OBJECT EXAMPLE Class Definition {
Background image of page 4
5 POINT OBJECT EXAMPLE Member Variables {
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 POINT OBJECT EXAMPLE Member Functions (Methods) {
Background image of page 6
7 POINT OBJECT EXAMPLE Constructor Implementation {
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 POINT OBJECT EXAMPLE Constructor Implementation {
Background image of page 8
9 POINT OBJECT EXAMPLE Print Function Implementation {
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 POINT OBJECT EXAMPLE x y p1 1.5 4
Background image of page 10
11 POINT OBJECT EXAMPLE x y x y p1 p2 1.5 4 0 0
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 POINT OBJECT EXAMPLE x y x y p1 p2 1.5 4 0 0
Background image of page 12
13 POINT OBJECT EXAMPLE x y x y p1 p2 1.5 4 0 0
Background image of page 13

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

View Full DocumentRight Arrow Icon
14 POINT OBJECT EXAMPLE x y x y p1 p2 1.5 4 0 0
Background image of page 14
15 POINT OBJECT EXAMPLE x y x y p1 p2 1.5 4
Background image of page 15

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

View Full DocumentRight Arrow Icon
16 POINT OBJECT EXAMPLE x y x y p1 p2 1.5 4 1.5
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/24/2010 for the course ENGINEERIN Bio taught by Professor Idonotknow during the Fall '08 term at University of Florida.

Page1 / 142

Chapter8 - Chapter 8 OBJECT ORIENTED PROGRAMMING I SOME...

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

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