Identify a task you perform regularly, such as 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?
Pseudo code for Driving a Car:
if (water_of_car is less) then
if (oil_of_car is less) then
}//end of while
}// end of driveCar()
// sub modules
Fill the radiator with enough Water;
fill the Oil tank;
go inside the car;
take the key and insert it into the key holder;
press the start button to start the engine of the ...
This solution provides a short pseudocode that accomplishes the task of driving a car.