Common Task in Pseudocode with 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?
https://brainmass.com/computer-science/pseudocode/common-task-in-pseudocode-with-data-and-processes-161537
Solution Preview
I have a bank account. I want to use this account to save and withdraw money. I also want to check how much money left in this account.
1. Here is a structured design that accomplishes this task.
I have a public variable, say balance. I have three tasks related to this balance.
(1) Save money
void save(double money) { balance = balance + money; }
(2) Withdraw money
void save(double money) {
// check if the balance has enough money to be withdrawed
if ...
Solution Summary
283 words convert the everyday task of using a bank account into object-orientated pseudocode.