Question: Solve in Java Programing Language classes inheritance abstract classes interfaces ThemePark Classes and Abstract Classes Visitor class with age, height and money. Attraction abstract class

Solve in Java Programing Language classes inheritance abstract classes interfaces ThemePark Classes and Abstract Classes Visitor class with age, height and money. Attraction abstract class with name, rating and visitCount (which starts at 0). Rollercoaster, Dodgems, Park and Playground classes which inherit from Attraction Stall abstract class which has name, owner name, rating and parking spot. CandyFlossStall, TobaccoStall and IceCreamStall which inherit from Stall. Interfaces Introduce some Interfaces to enable charging, restricting and reviewing attraction sand stalls: 1.ITicketed : double defaultPrice() and double priceFor(Visitor) 2.ISecurity : boolean isAllowedTo(Visitor) 3.IReviewed :int getRating() and String getName() * Have some of the classes implement these interfaces. Below are the rules about what the implementations should be: 4.Playground implements ISecurity because it has a maximum age of 15 5.TobaccoStall implements ISecurity because it has a minimum age of 18 6.Rollercoster implements ISecurity and requires a visitor to be over 145cmtall and over 12 years of age 7.All Stalls and Attractions implement IReviewed. Note: Starting prices are: $8.40 for Rollercoaster $4.50 for Dodgems 8.Rollercoaster implements ITicketed and charges tall people over 200cm double fee 9.Dodgems implements ITicketed and charge half price to children under 12years old Create ThemePark class to manage the attractions and stalls. 1.ThemePark stores all Attractions and Stalls in it. 2.ThemePark has a method getAllReviewed() which returns an ArrayList of IReviewed objects. 3.Add an empty visitedAttractions ArrayList to Visitor which stores a list of Attractions and a method to add an attraction to the list. 4.ThemePark has a method visit(Visitor, Attraction) calls for the attractionto increment its visitCount by 1 and adds the attraction to the visitors visitedAttractions list.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!