Object Oriented Wk 8

Only available on StudyMode
  • Download(s) : 213
  • Published : September 7, 2011
Open Document
Text Preview
Maxine L. Cruz
Casandra Richardson
CheckPoint: Object-Oriented Data and Processes

Identify a task you perform regularly, such as cooking, mowing the lawn, or driving a car. Write a short, structured design (pseudocode only) that accomplishes this task. Think about this task in an object-oriented way, and identify the objects involved in the task. Identify how you can encapsulate the data and processes you identified into an object-oriented design. Describe the architectural differences between the object-oriented and structured designs. Which of the designs makes more sense to you? Why? Post the assignment as a Word attachment.

Driving a Car


Main Module
Call Open Door Module
Call Start Car Module
Call Drive Car Module
End Main Module

Open Door Module

Class Car (door, seat, key, ignition, mirrors, seatbelt, shifter, clutch, brake, gas)
Open Door
Get in car
Sit in the driver’s seat
Place seatbelt on
Close door
End Program

Start Car Module
Enter Key in ignition
Place foot on brake
Turn Key to on position

End Program

Drive Car Module
Place gear in Drive
Press foot to accelerator
Check mirrors and proceed forward
End Drive Car Module


The Driver is an object that when sitting in the driver’s seat and starting the car, the driver turning the key sends a message to the ignition to start the engine. Therefore the car will start. Then when the car is started, the driver sends another message by shifting the gear so that when the driver places the foot on the accelerator, it therefore, sends another message to the engine how the idle will be. How much RPM’s will run so that the car will begin to accelerate given the selection of gear the driver has placed it in. These are messages sent back and forth.

In the OOP, the “objects” will store data, send messages to other objects and receives messages from other objects. The object oriented...
tracking img