Introduction To Object-Oriented Programming and Software Development
Introduction To Object-Oriented Programming and Software Development
After you have read and studied this lesson, you should be
able to:
• Name the basic components of object-oriented programming
• Differentiate classes and objects.
• Differentiate class and instance methods.
• Differentiate class and instance data values.
• Draw program diagrams using icons for classes and objects
• Describe significance of inheritance in object-oriented programs
• Name and explain the stages of the software lifecycle
Classes and Objects
<Class Name>
We use a rectangle to
represent a class
with its name
appearing inside the
rectangle.
We use a rectangle to
represent an object and
<Object Name> place the underlined
name of the object
inside the rectangle.
Example:
Example:
deposit 250.00
SV198 : BankAccount
Sending a Message and Getting an Answer
getCurrentBalance()
SV198 : BankAccount
current balance
MobileRobot
getMaximumSpeed()
maximum speed
Class and Instance Data Values
BankAccount
minimum balance There is one copy of
minimum balance for
100.00 the whole class and
shared by all instances.
This line is an
instance-of
relationship.
SV129 : BankAccount
Checking Savings
Inheritance Hierarchy
Graduate Undergrad
1. Analysis
2. Design
3. Coding
4. Testing
5. Operation and
Maintenance