35699292

Category: Essay cases,
Words: 522 | Published: 01.16.20 | Views: 121 | Download now

language

Identify a task you conduct regularly, such as cooking, mowing and trimming the grass, or driving a car. I utilized driving a car since the model in this gate. Write a short, structured style (pseudocode only) that accomplishes this task.

Announce CarDoor since Real Announce Car while Real File BrakePedal as Real State Reverse while Real State SteeringWheel because Real State Drive while Real Open up CarDoor Take a seat in Car Close CarDoor Press BrakePedal Start Car Put Car in Reverse Relieve BrakePedal Convert SteeringWheel Press BrakePedal Set Car in Drive

Release BrakePedal Increase Car Correct SteeringWheel End Program Think about this task in an object-oriented way, and determine the things involved in the activity. The car is usually an object active in the task. Houses include: manufactured from metal, plastic-type, and rubberized, has four tires, includes a front and back windshield, has rider and passenger windows, includes a steering wheel, a shifter, headlights, taillights, the motor engine, a transmission and a gas tank. Functions include: transfers the user to all their desired destination.

Ideal for: the road. The car door is usually an object mixed up in task. Homes include: made from metal, has a handle and a locking mechanism, encases a window. Functions include: protect passenger in to vehicle, casing for home window, and reflection attaches to it. Works on: a vehicle. Discover how you can encapsulate the data and processes you identified in to an object-oriented design. Course CarOperation Announce Car since Real Announce CarEntry because Real State CarDriver because Real Subprogram EnterCar Collection EnterCar sama dengan Open CarDoor

Sit in Car Close CarDoor End Subprogram Subprogram DriveCar Set DriveCar = Start Car Put Car in Reverse Relieve BrakePedal Convert SteeringWheel Press BrakePedal Set Car in Drive Launch BrakePedal Accelerate Car Help straighten SteeringWheel End Subprogram Function EnterCar() because Real Established EnterCar sama dengan CarEntry End Function Function DriveCar() as Real Collection DriveCar sama dengan CarDriver End Function End Class Describe the new differences involving the object-oriented and structured styles.

Which in the designs makes more sense to you? Why? A coder using the top-down, modular method of program style begins by simply determining important tasks. An object-oriented coder, on the other hand, decides the fundamental items associated with a problem. Structured styles make more sense in my experience because which what we have been working with in the last 7 weeks. However , I actually do see the main advantages of object-oriented programming and wish we had been capable of study this more.

At the moment I am still a rookie at computer programming and do not mind deciding the fundamental jobs of courses, it helps me better understand things, although programmers by advanced levels wouldn’t want to break straight down every important task of each and every program they write. With time, and with more teaching, Let me become more accustom to object-oriented programming. When this arises, I’m sure i will change the response to this response. I’m sure with time and encounter, object-oriented programming will make even more sense in my experience.

< Prev post Next post >