Assignment: #AmusementRide Due: 03/24/02019 Points: 6

Specification

Copy the program AmusementRide.java to your computer and add your own class that extends class AmusementRide.

Note: AmusementRide.java contains two classes (class FerrisWheel and class RollerCoaster) that provide examples for the class you must create.

Your class must include the following.

The main() method in abstract class AmusementRide must keep the class FerrisWheel and class RollerCoaster objects. The main() method must also keep the following behavior:

   // pseudo-code...
   obj.load() 
   if (obj.start())
      obj.stop()
   obj.repair()

However, you must change the main() method to use polymorphism. [hint: array]

The first six lines of the program's output must match the following.

Ferris wheel "The Billy Preston" has capacity of 50 and costs $6.28
...height: 100; # of spins: 0
mechanics are on strike
Roller coaster "for(;;) Young" has capacity of 32 and costs $3.14
...maxSpeed: 99; trackLength: 25; whiplashFactor: 1.618
mechanics are on strike
Example Output

CSC205 student Edith Foogooman created class BumperCar and she named her ride "Self-driving Bumpers". The output of her program looked as follows.

Ferris wheel "The Billy Preston" has capacity of 50 and costs $6.28
...height: 100; # of spins: 0
mechanics are on strike
Roller coaster "for(;;) Young" has capacity of 32 and costs $3.14
...maxSpeed: 99; trackLength: 25; whiplashFactor: 1.618
mechanics are on strike
Bumper cars "Self-driving Bumpers" has capacity of 17 and costs $6.28
...weight: 13; speed: 8; os: Linux
Self-driving Bumpers has been loaded
Self-driving Bumpers has started
Self-driving Bumpers has stopped
Self-driving Bumpers has been repaired