This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

MattT
MattT presents ...

2012/2/27

Rush Hour 1.0

1. Explain the benefits, as evident in this scenario, of using inheritance.
I don't have to program both man and woman separately when it comes to something like collision. When a pedestrian decides to run, any vehicle it coems in premise with will activate it, so I do not have to individually code for Car, Taxi and Ambulance with radius collision with the two Pedestrians.

2. Explain the benefits, as you experienced in this activity, of well-documented classes with properly encapsulated data.
A programming partner or someone who would like to use some of the program that the original programmer programmed is much easier to use. I can also prevent hackers (not computer security hackers) from editing values without accessing my codes. Since Mr. Cohen documented some of the API for me, it was much easier for me to use the methods in a class in another object.

2227 views / 4 in the last 7 days

Tags: simulation demo with-source

open in greenfoot
Your browser does not support the canvas tag.

No Comments

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.