Question 2 Given the following classes and inheritance hierary, which are used to store information of extreme games com

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 2 Given the following classes and inheritance hierary, which are used to store information of extreme games com

Post by answerhappygod »

Question 2 Given The Following Classes And Inheritance Hierary Which Are Used To Store Information Of Extreme Games Com 1
Question 2 Given The Following Classes And Inheritance Hierary Which Are Used To Store Information Of Extreme Games Com 1 (46.94 KiB) Viewed 9 times
Question 2 Given the following classes and inheritance hierary, which are used to store information of extreme games competition. Class Name: ExtremeGames b) protected String player_name; protected String game_name; //normal constructor; //setter methods; {abstract] //getter methods; //printer method; public abstract double calcFee (); Class Name: LandGames private boolean team_game; // true - if play with partner //constructor; //setter methods; //getter methods; //printer method; //processor method; //calcFee () Game Name Skateboard BMX Motorcross Class Name: WaterGames private char gender; // M -male, F -female Based on the above information, do the following tasks: a) Write the definition of method calcFee () for LandGames using following information: LandGames //constructor; //setter methods; //getter methods; //printer method; //processor method; //calcFee () Fee RM 100 RM 250 RM 300 If the player chooses the team game, extra RM80 will be added to the fee. Assume that data have been given to an array of 10 objects called egList. By using the concept of polymorphism, write a program segment in main () to calculate the total fee collected from all BMX games without team game. HI Or
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply