Lecture 2

Object Orientation


  James Uren



     BIT204

Software Design
Lecture 2

                             Object Orientation



Object Orientated Software

Modern software languages (VB.NE...
Upcoming SlideShare
Loading in …5
×

BIT204 2 Object Orientation

364 views
293 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
364
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

BIT204 2 Object Orientation

  1. 1. Lecture 2 Object Orientation James Uren BIT204 Software Design
  2. 2. 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

×