The Faculty of Computer and Mathematical Sciences are going to organize an ICT Festival. The festival...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The Faculty of Computer and Mathematical Sciences are going to organize an ICT Festival. The festival consists of exhibitions of ICT products from the government and private sectors. Meanwhile, for ICT competition during the festivals: there will be two categories of ages which are junior and senior. Given the following superclass named ICTFestival and subclasses named Exhibitor and Contestant: public abstract class ICTFestival { } protected String participant Name; protected int participantID; // 1-250 protected String email; } //normal constructor //setter methods //getter methods public String toString() public abstract double enrollFee (); public class Exhibitor extends ICTFestival { private char sector; // G for government, P for private private int noOfBooth; //normal constructor //setter method //getter public String toString() public double enrollFee () {...} public class Contestant extends ICTFestival { private int level; private int members; //normal constructor //setter method // 1 for junior, 2 for senior //getter public String toString() public double enrollFee () {...} a. Write the definition of method enrollFee() for both subclasses that calculate and return the enrollment fee using the following information: For Exhibitors, the enrollment fee will be calculated as shown in Table 1. Table 1 Sector G (Government sector) P (Private sector) For Contestants, the enrollment fee will be calculated as shown in Table 2. Level Level 1 (Junior) Level 2 (Senior) Enrollment Fee (RM) 250 (1 booth) additional RM 50 per booth 300 (1 booth) additional RM 100 per booth Table 2 Enrollment Fee (RM) 100 additional RM 50 for extra member 150 additional RM 100 for extra member (8 marks) b. Declare an array of type ICTFestival named participants with size 250. (1 mark) c. Assume 250 objects of Exhibitor and Contestant are stored inside the array in b). Using the array, write program fragments for the following questions. i. Calculate and display the total number of booth for Private Sector Exhibitors. (3 marks) ii. Print the participant name and enrollment fee for participants from UiTM. (Check the email of the participants whether it contains "@uitm.edu.my using indexOf()). (3 marks) The Faculty of Computer and Mathematical Sciences are going to organize an ICT Festival. The festival consists of exhibitions of ICT products from the government and private sectors. Meanwhile, for ICT competition during the festivals: there will be two categories of ages which are junior and senior. Given the following superclass named ICTFestival and subclasses named Exhibitor and Contestant: public abstract class ICTFestival { } protected String participant Name; protected int participantID; // 1-250 protected String email; } //normal constructor //setter methods //getter methods public String toString() public abstract double enrollFee (); public class Exhibitor extends ICTFestival { private char sector; // G for government, P for private private int noOfBooth; //normal constructor //setter method //getter public String toString() public double enrollFee () {...} public class Contestant extends ICTFestival { private int level; private int members; //normal constructor //setter method // 1 for junior, 2 for senior //getter public String toString() public double enrollFee () {...} The Faculty of Computer and Mathematical Sciences are going to organize an ICT Festival. The festival consists of exhibitions of ICT products from the government and private sectors. Meanwhile, for ICT competition during the festivals: there will be two categories of ages which are junior and senior. Given the following superclass named ICTFestival and subclasses named Exhibitor and Contestant: public abstract class ICTFestival { } protected String participant Name; protected int participantID; // 1-250 protected String email; } //normal constructor //setter methods //getter methods public String toString() public abstract double enrollFee (); public class Exhibitor extends ICTFestival { private char sector; // G for government, P for private private int noOfBooth; //normal constructor //setter method //getter public String toString() public double enrollFee () {...} public class Contestant extends ICTFestival { private int level; private int members; //normal constructor //setter method // 1 for junior, 2 for senior //getter public String toString() public double enrollFee () {...} a. Write the definition of method enrollFee() for both subclasses that calculate and return the enrollment fee using the following information: For Exhibitors, the enrollment fee will be calculated as shown in Table 1. Table 1 Sector G (Government sector) P (Private sector) For Contestants, the enrollment fee will be calculated as shown in Table 2. Level Level 1 (Junior) Level 2 (Senior) Enrollment Fee (RM) 250 (1 booth) additional RM 50 per booth 300 (1 booth) additional RM 100 per booth Table 2 Enrollment Fee (RM) 100 additional RM 50 for extra member 150 additional RM 100 for extra member (8 marks) b. Declare an array of type ICTFestival named participants with size 250. (1 mark) a. Write the definition of method enrollFee() for both subclasses that calculate and return the enrollment fee using the following information: For Exhibitors, the enrollment fee will be calculated as shown in Table 1. Table 1 Sector G (Government sector) P (Private sector) For Contestants, the enrollment fee will be calculated as shown in Table 2. Level Level 1 (Junior) Level 2 (Senior) Enrollment Fee (RM) 250 (1 booth) additional RM 50 per booth 300 (1 booth) additional RM 100 per booth Table 2 Enrollment Fee (RM) 100 additional RM 50 for extra member 150 additional RM 100 for extra member (8 marks) b. Declare an array of type ICTFestival named participants with size 250. (1 mark) c. Assume 250 objects of Exhibitor and Contestant are stored inside the array in b). Using the array, write program fragments for the following questions. i. Calculate and display the total number of booth for Private Sector Exhibitors. (3 marks) ii. Print the participant name and enrollment fee for participants from UiTM. (Check the email of the participants whether it contains "@uitm.edu.my using indexOf()). (3 marks) c. Assume 250 objects of Exhibitor and Contestant are stored inside the array in b). Using the array, write program fragments for the following questions. i. Calculate and display the total number of booth for Private Sector Exhibitors. (3 marks) ii. Print the participant name and enrollment fee for participants from UiTM. (Check the email of the participants whether it contains "@uitm.edu.my using indexOf()). (3 marks)
Expert Answer:
Answer rating: 100% (QA)
a Definition of method enrollFee for both subclasses Exhibitor and Contestant java public double enr... View the full answer
Related Book For
Modern Advanced Accounting In Canada
ISBN: 9781259066481
7th Edition
Authors: Hilton Murray, Herauf Darrell
Posted Date:
Students also viewed these programming questions
-
The intention for investigating the project management software tools is to deploy them to assist your group in completion by enabling the teams activities relating to Initiating, Planning,...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The adjusted trial balance for Ray Corporation at July 31, 2017, the corporation's fiscal year end, contained the following: Of the lease liability amount, $16,250 is due within the next year. Total...
-
Construct a point and figure chart for Computers, Inc., using again the data in Table 9.3 . Use $2 increments for your chart. Do the buy or sell signals derived from your chart correspond to those...
-
Provide analysis on the concept of event marketing and its importance of customer engagement and brand development.? Explain the importance of an event marketing plan.
-
If a company with a 12/31 year-end lends money in the form of a 6-month note on 11/1, which accounts will be credited when the note is paid off on 4/30?
-
From the following information, compute the early, late, and slack times for each activity. Identify the critical path. Code Software Lag 2 A Debug Lag 2 Design B D Order Assemble Install Parts Lag 3...
-
To demonstrate the power of our statuses over our behavior, look at Milgram's Obedience Study Why did the study participants continue to administer electric shocks? What would you have done? A study...
-
A probability plot of 66 yr of peak discharges for the Kentucky River near Salvisa, Kentucky, is shown in Fig. P3-19 (a) What probability distribution is being used? (b) What are the mean and...
-
On Jan 1, 2016 Sandra Company purchases equipment at a cash price of $80,000. Related expenditures are sales taxes $4,000, insurance during shipping $1000, Insurance for one year $2000, fuel for...
-
What are anaplerotic reactions, and how do they maintain the pool of intermediates in the citric acid cycle? Discuss the significance of these reactions in high-energy-demand tissues like the liver...
-
Exotic Engine Shop uses a job order cost system to determine the cost of performing engine repair work. Estimated costs and expenses for the coming period are as follows: Engine parts $1,356,300 Shop...
-
1: Which do you prefer McGregor's Theory X or Theory Y? What does this mean about your personal management style and the type of person you are to work for? With? Pick two authors that we've read...
-
Part A A 8.010-2-kg toy airplane is tied to the ceiling with a string. When the airplane's motor is started, it moves with a constant speed of 4.21 m/s in a horizontal circle of radius 1.42 m, as...
-
Three charged marbles are glued to a nonconducting surface and are placed in the diagram as shown. The charges of each marble are q = 5.90 C, q2 = 1.35 C, and 93 = -1.71 C. Marble q is a distance r =...
-
In Lewis structure for BrF 2 + (Make Brcentral atom, and make formal charge on F zero). How manylone pairs in the whole structure? 3 4 5 6 7 8 9 10
-
Dr. Chan obtained a $15,000 demand loan at prime plus 1.5% on September 13 from the Bank of Montreal to purchase a new dental X-ray machine. Fixed payments of $700 will be deducted from the dentists...
-
IAS 16, "Property, Plant, and Equipment" requires assets to be initially measured at cost. Subsequently, assets may be carried at cost less accumulated depreciation, or they can be periodically...
-
You have been recently elected to the position of treasurer on the board of directors for Canoes Are Us, a community-based service and NFPO that provides canoeing lessons and canoe rentals to various...
-
Briefly outline the process for determining if goodwill is impaired.
-
Refer to the information in S6-1 . Calculate the gross margin for the month of August. Data from S6-1 Garda's Equipment has the following items in its inventory on August 1: The company uses the...
-
Elmo's Music carries a large inventory of guitars and other musical instruments. The store uses the FIFO method and a perpetual inventory system. Company records indicate the following for a...
-
The account number 211031 most likely refers to a. Liabilities b. Current liabilities c. Accounts payable d. An individual supplier
Study smarter with the SolutionInn App