Object-Oriented Data and Processes
Essay Preview: Object-Oriented Data and Processes
Report this essay
Object-Oriented Data and Processes
Identify a task performed regularly.
Driving a car!
Write a short, structured design (pseudocode only) that accomplishes this task.
Declare Car Door as Real
Declare Car as Real
Declare Brake Pedal as Real
Declare Drive as Real
Open Car Door
Sit in Car
Close CarDoor
Press BrakePedal
Start Car
Put car in Drive
Release BrakePedal
Accelerate Car
End Program
Think about this task in an object-oriented way, and identify the objects involved in the task.
Involved in this program are the car and the person driving the car. The properties include
a car, a door, the handle of the door, and brake pedal. All objects included in this are the
cars four tires, the metal surrounding the car, the rubber on the tires, the engine.
Identify how you can encapsulate the data and processes you identified into an object-oriented design.
Class Car Operation
Declare Car as Real
Declare Car Entry as Real
Declare Car Driver as Real
Subprogram Enter Car
Set Enter Car = Open Car Door
Get into Car
Close Car Door
End Subprogram
Subprogram Drive Car
Set Drive Car = Start Car
Put Car in Drive
Release Brake Pedal
Accelerate Car
End Subprogram
Function Enter Car () as Real
Set Enter Car = Car Entry
Essay About Car Door And Open Car Door
Essay, Pages 1 (220 words)
Latest Update: July 4, 2021
//= get_the_date(); ?>
Views: 84
//= gt_get_post_view(); ?>
Car Door And Open Car Door. (July 4, 2021). Retrieved from https://www.freeessays.education/car-door-and-open-car-door-essay/