Object Oriented Design of a Car
Not what you're looking for?
? 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?
___________________________________________________________________________
Driving a Car
Objects:
1. Car has the following objects (door, ignition, seat belt, mirror, gear, and accelerator)
2. Key
In the driving seat
Close the Door
Seat belts on
Use key for ignition
Check Mirror
Engage Gears
Press Accelerator
With Car
Set Door.close = true
Set Seat-belt.on = true
Call Ignition(Key)
Call Mirror.adjust()
Call Gears engage()
Call Accelerator Press()
End With Car
Purchase this Solution
Solution Summary
Shows how to model a car as a object in OOPL.
Solution Preview
Please see the attached file.
? Identify how you can encapsulate the data and processes you identified into an object-oriented design.
Object Car uses Object { door, ignition, seat-belt, mirror, gear, accelerator}
Object door{
Properties:
Boolean close
}
Object ignition interfaces with Object key{
Method:
start(Object key)
}
Object ...
Purchase this Solution
Free BrainMass Quizzes
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Basic UNIX commands
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.