Question
need code and output as soon as possible .no need explanation of the code question: A top level structure Themepark should be used to create
need code and output as soon as possible .no need explanation of the code
question:
A top level structure "Themepark" should be used to create 2 classes "Queensland" and "Veegaland". In both the theme parks, the entrance fee for adults is Rs.500 and for children its is Rs.300. if a family buys 'n' adults tickets and 'm' children tickets, provide a method to calculate the total cost. In Queensland, there are a total of 30 games and in Veegaland, it is 40. Hence Boolean array named "Games" of size 30 and 40 for both which initially stores false values for all the elements should be created . Declare a method playGame() which must be redefined in the subclasses as follows. In Veegaland, if the player enters any game code that has already been played. A warning message should be displayed and the user should be asked for another choice. In Queensland, play the game as long as he wants. The games can be replayed. Finally display the total count of games that were repeated and count of the games which were not played at all. Use a suitable concept - Abstract class or interface.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started