UUM Sport Center provides sport facilities to its customers who are either students, staff or non-UUM...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
UUM Sport Center provides sport facilities to its customers who are either students, staff or non-UUM (outsiders). The types of facilities provided and their hourly charges are based on the customer categories as shown below: Charge Per Hour (RM) Type of Facility Badminton Student Staff Non-UUM Free 4.00 8.00 Squash Free 1.00 6.00 Sauna 3.00 5.00 10.00 The sport center wants you to write a program that can be used by its staff to calculate the charge to be paid by its customers. Six sample running of the program's GUI are shown below: UUM Sport Center Charg... Facility Type: Squash Num Of Hours: 2 Calculate Charge Category: Student Facility Type: Squash Number of hours: 2 Charge: 0.0 UUM Sport Center Charg... Facility Type: Squash Num Of Hours: 2 Calculate Charge Category: NonUUM Facility Type: Squash Number of hours: 2 Charge: 12.0 UUM Sport Center Charg... Category: Facility Type: Student Badminton Staff Non-UUM Num Of Hours: 1 Calculate Charge Category: Staff Facility Type: Badminton Number of hours: 1 Charge: 4.0 UUM Sport Center Charg... Category: Student Facility Type: Sauna Staff Non-UUM Num Of Hours: 1 Calculate Charge Category: Student Facility Type: Sauna Number of hours: 1 Charge: 3.0 Category: Student Staff Non-UUM Category: Student Staff Non-UUM UUM Sport Center Charg.... Facility Type: Sauna Num Of Hours: Calculate Charge Category: Staff Facility Type: Sauna UUM Sport Center Charg... Category: Student Staff Facility Type: Sauna Non-UUM Num Of Hours: 2 Calculate Charge Category: NonUUM Facility Type: Sauna Category: Student Staff Non-UUM Number of hours: 2 Charge: 10.0 Number of hours: 2 Charge: 20.0 This program uses two classes, SportChargeCalculator UI and Customer, as shown in the UML class diagrams below: Customer SportChargeCalculatorUI //GUI components not shown here + SportChargeCalculatorUI() -calcBTNActionPerformed(): void category: String - facType: String hours: int + Customer(String category, String facType, int hours) + calculateCharge(): double The SportCharge CalculatorUI class has GUI components whose names are shown as below: UUM Sport Center Charg... Facility Type: typeCB Badminton hoursTF Num Of Hours: 2 Calculate Charge Category: Student Facility Type: Badminton Number of hours: 2 Charge: 0.0 Category: studentRB Student staffRB Staff nonUUMRB Non-UUM calcBTN outputTA When the calcBTN button is clicked, the handler method calcBTNActionPerformed () will read the three input data (facility type, category and hours), create an object of the Customer class by passing these three data as parameters to the constructor, calculate the charge by calling the calculateCharge () method and display the output containing the customer category, the facility used, the number of hours and the calculated charge in the text area (named outputTA). Based on the provided information above, write the UUM sport center charge calculator program by defining the Customer and SportChargeCalculatorul classes. NOTE: The files that must be submitted in your compressed file are Customer.java, SportChargeCalculatorUI.java and SportCharge CalculatorUI.form. The incomplete definition of the Customer class is given to you as shown below: Customer.java public class Customer ( private String category; //Customer category private String facType; //type of facility used private int hours; // number of hours used //define the constructor: //define the calculate Charge () method: UUM Sport Center provides sport facilities to its customers who are either students, staff or non-UUM (outsiders). The types of facilities provided and their hourly charges are based on the customer categories as shown below: Charge Per Hour (RM) Type of Facility Badminton Student Staff Non-UUM Free 4.00 8.00 Squash Free 1.00 6.00 Sauna 3.00 5.00 10.00 The sport center wants you to write a program that can be used by its staff to calculate the charge to be paid by its customers. Six sample running of the program's GUI are shown below: UUM Sport Center Charg... Facility Type: Squash Num Of Hours: 2 Calculate Charge Category: Student Facility Type: Squash Number of hours: 2 Charge: 0.0 UUM Sport Center Charg... Facility Type: Squash Num Of Hours: 2 Calculate Charge Category: NonUUM Facility Type: Squash Number of hours: 2 Charge: 12.0 UUM Sport Center Charg... Category: Facility Type: Student Badminton Staff Non-UUM Num Of Hours: 1 Calculate Charge Category: Staff Facility Type: Badminton Number of hours: 1 Charge: 4.0 UUM Sport Center Charg... Category: Student Facility Type: Sauna Staff Non-UUM Num Of Hours: 1 Calculate Charge Category: Student Facility Type: Sauna Number of hours: 1 Charge: 3.0 Category: Student Staff Non-UUM Category: Student Staff Non-UUM UUM Sport Center Charg.... Facility Type: Sauna Num Of Hours: Calculate Charge Category: Staff Facility Type: Sauna UUM Sport Center Charg... Category: Student Staff Facility Type: Sauna Non-UUM Num Of Hours: 2 Calculate Charge Category: NonUUM Facility Type: Sauna Category: Student Staff Non-UUM Number of hours: 2 Charge: 10.0 Number of hours: 2 Charge: 20.0 This program uses two classes, SportChargeCalculator UI and Customer, as shown in the UML class diagrams below: Customer SportChargeCalculatorUI //GUI components not shown here + SportChargeCalculatorUI() -calcBTNActionPerformed(): void category: String - facType: String hours: int + Customer(String category, String facType, int hours) + calculateCharge(): double The SportCharge CalculatorUI class has GUI components whose names are shown as below: UUM Sport Center Charg... Facility Type: typeCB Badminton hoursTF Num Of Hours: 2 Calculate Charge Category: Student Facility Type: Badminton Number of hours: 2 Charge: 0.0 Category: studentRB Student staffRB Staff nonUUMRB Non-UUM calcBTN outputTA When the calcBTN button is clicked, the handler method calcBTNActionPerformed () will read the three input data (facility type, category and hours), create an object of the Customer class by passing these three data as parameters to the constructor, calculate the charge by calling the calculateCharge () method and display the output containing the customer category, the facility used, the number of hours and the calculated charge in the text area (named outputTA). Based on the provided information above, write the UUM sport center charge calculator program by defining the Customer and SportChargeCalculatorul classes. NOTE: The files that must be submitted in your compressed file are Customer.java, SportChargeCalculatorUI.java and SportCharge CalculatorUI.form. The incomplete definition of the Customer class is given to you as shown below: Customer.java public class Customer ( private String category; //Customer category private String facType; //type of facility used private int hours; // number of hours used //define the constructor: //define the calculate Charge () method:
Expert Answer:
Answer rating: 100% (QA)
Based on the table you provided you can write a program in a programming language like Python to cal... View the full answer
Related Book For
Cost Management Accounting and Control
ISBN: 978-0324559675
6th Edition
Authors: Don R. Hansen, Maryanne M. Mowen, Liming Guan
Posted Date:
Students also viewed these programming questions
-
A certain brand of fluorescent bulbs will last, on the average, 1000 hours. Suppose that four of these bulbs are installed in an office. What is probability that all four are still functioning after...
-
UUM Sport Center provides sport facilities to its customers who are either students, staff or non-UUM (outsiders). The types of facilities provided and their hourly charges are based on the customer...
-
VMP = MRP for a price taker but not for a price searcher. Do you agree or disagree with this statement? Explain your answer.
-
Roberta, Inc., manufactures elliptical machines for several well-known companies. The machines differ significantly in their complexity and their manufacturing batch sizes. The following costs were...
-
Evaluate the following integrals. .10 5 V100 - x dx
-
George Oppenheimer, an agent for Wellington Farms of Massachusetts, Inc., had contacted Mark Kiriakou from the Capital Area Food Bank regarding an order for frozen turkey meat. In an exchange of...
-
(Corrected Trial Balance) The trial balance of Antoine Watteau Co. shown below does not balance. Each of the listed accounts has a normal balance per the general ledger. An examination of the ledger...
-
Problem 4. Consider the following imperfect information game. Notice that both play- ers have two information sets. 5,2 1 a b 2 t 1 d d 4,3 6.0 4,6 0,4 6,0 (a) Find all subgame perfect Nash...
-
3.95 Copper tubing is joined to a solar collector plate of thickness t, and the working fluid maintains the tem- perature of the plate above the tubes at T There is a uniform net radiation heat flux...
-
f ( x, y, z ) = xe 4 yz , P (3, 0, 1), u = <2/3, -1/3, 2/3> (a) Find the gradient of f . f ( x, y, z ) = < , , > (b) Evaluate the gradient at the point P . f (3, 0, 1) = < , , >...
-
$30,000 June 21 $20,000 June 29 b. 20,000 June 30 8,000 June 20 c. 10,000 June 29 6,000 June 30 d. 40,000 June 30 24,000 July 3 e. 100,000 June 30 56,000 June 30 (shipped to consignee) July f....
-
Over the past 3 years, the average April 1st feeder cattle basis in Dodge City, KS has been 10 cents/lb. Currently, Apr 2024 feeder cattle futures are trading at 235.00 cents/Ib. Therefore, the...
-
Describe FDA method to determine efficacy of disinfectants/antiseptics with Example
-
What lipids have a protective effect against cardiovascular disease?
-
Is the purchase order sufficient to satisfy the statute of frauds? Why or why not?
-
2. Match each term with the correct definition. LO2.2 private property freedom of enterprise mutually agreeable freedom of choice self-interest competition market a. An institution that brings buyers...
-
XYZ Inc. a calendar year, accrual basis corporation, had the following items during 2021: Gross revenue from operations Cost of goods sold $420,000 ($180,000) $9,000 LT capital gain .LT capital...
-
Deercreek Corporation presented two years of data for its Sporting Goods Division and its Camping Division. Required: 1. Compute the ROI and the margin and turnover ratios for each year for the...
-
An effective budget converts the goals and objectives of an organization into data. The budget serves as a blueprint for managements plans. The budget is also the basis for control. Management...
-
Antler Company manufactures glass cleanser. The mixing department, the first process department, mixes the chemicals required for the cleanser. The following data are for 2010: Work in process,...
-
Consider the following time series data. a. Construct a time series plot. What type of pattern exists in the data? b. Show the four-quarter and centered moving average values for this time series. c....
-
The following table reports prices and usage quantities for two items in 2009 and 2011. a. Compute price relatives for each item in 2011 using 2009 as the base period. b. Compute an unweighted...
-
Refer to exercise 35. a. Deseasonalize the time series using the adjusted seasonal indexes computed in part (c) of exercise 35. b. Using Minitab or Excel, compute the linear trend regression equation...
Study smarter with the SolutionInn App