Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in java program The following classes and inheritance hierarchy are used to store the information of people attending a conference: Person name: String type intr-Presenter,
in java program
The following classes and inheritance hierarchy are used to store the information of people attending a conference: Person name: String type intr-Presenter, 2-Participant - Person(String, int setPerson/String Int vold getName: String .getType: Int .toString: String Citizen NonCitizen IN Sting passport No String -NonCanzon(Sting. me. Stingle - Cinzentrieg Int. String Setizen String, int String: vold getico Swing - String: Sting GaicFeel: double - selfonien(String, int Strings vold - getPassporto: String - ToString Sering - calcFeed double Tasks: I a) Define all classes above. b) Write the definition of method calcFee () for both subclasses. The methods determine the fee to be paid by a person using the following table: Fee (RM) Person Presenter Participant Citizen 1272.00 795.00 Non Citizen 1484.00 900.00 c) Write a driver program to test your inheritance classes. 1) Declare an array of object, cList to store data on Citizen objects. The size of the array is determined by the user. ii) Calculate and display the total fees collected from the participants. iii) Display the list of presenters (name) for those who from Johor 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