BIT204 2 Object Orientation
Upcoming SlideShare
Loading in...5
×
 

BIT204 2 Object Orientation

on

  • 411 views

 

Statistics

Views

Total Views
411
Views on SlideShare
395
Embed Views
16

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 16

http://www.techgig.com 16

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

BIT204 2 Object Orientation BIT204 2 Object Orientation Document Transcript

  • Lecture 2 Object Orientation James Uren BIT204 Software Design
  • Lecture 2 Object Orientation Object Orientated Software Modern software languages (VB.NET, C++, Java) use the software model of object orientation (OO). This means data and functionality are wrapped up in objects (or classes) that can manage their data privately and inherit properties from other objects. The objects in software design will often take their names from the nouns in the specification. For example, in a driving computer game, the Car object will contain data like the car’s weight, and functionality like ‘Accelerate’. The FordEscort object inherits these properties and implements the Car’s functionality. This means the Driver object that is calling on the Car, does not need to know the model of the car. This is called polymorphism. Note that in this case it is never possible to create a generic Car object as this class is abstract or virtual. Driver Has A Car Is A FordEscort The above representation of OO software is called UML (Universal Modelling Language). In C it would be described like this: class Driver { Driver() {} // Constructor // (called when object is created) ~Driver() {} // Destructor // (called when object is deleted) Lecture 1: Software Fundamentals BIT204: Software Design – James Uren 2