Question: Write a program that computes and displays the charges for total sale (daily). First, the program should ask if the customers want membership or not.











Write a program that computes and displays the charges for total sale (daily). First, the program should ask if the customers want membership or not. If the customer want to booking court the following data should be entered: (a) Hours rented courts (b) Membership price (years) discount 20% The program can calculate Total sale for badminton and basketball Court Hour Fee Badminton 1 10 2 20 3 30 Basketball 1 90 2 120 3 150 Following output: Insert Name: Anne Telephone Number: 01111111 IC number: 1001 Court type : Badminton Time : 110120 Date : 1300 Hours rented : 2 Are you a member? : No Name : Anne Telephone Number :1111111 IC Number: 1001 Court Type : Badminton Court Hours : 2 Court Price : RM20.0 Your Total Price : RM20.0 Insert Name: Ali Telephone Number: 011111 IC number: 1002 Court type : Basketball Time : 1 Date : 11 Hours rented : 2 Are you a member? : Yes Name : Ali Telephone Number :11111 IC Number:1002 Court Type : Basketball Court Hours : 2 Court Price: $120.0 Your Total Price: $96.0 Total Sale is $116.0 Using bluej, How to calculate total sale, non member + membersip You can add total sale in my main program. Here is my program import java.util.Scanner; import javax.swing.*; class customerApp { //main program public static void main(String [] args) { String nm = ""; int pNo = 0; int icNo = 0; String CT = ""; int cNo = 0; String tme = ""; String dte = ""; int hrs=0; String member = ""; double priceCust; double discount; Scanner in = new Scanner(System.in); System.out.print("Insert the number of customer :"); int size = in.nextInt(); int number() = new int[size]; for(int i=0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
