Page 1 of 1

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

Posted: Tue Jul 05, 2022 10:34 am
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 11 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