Question: Q1 & Q2 , please .. CpE: 201: Object-Oriented Paradi 2015 Assignment # 1 Due Tuesday Fe 12, 2019 Q1.(10 pts) Write a Java program
CpE: 201: Object-Oriented Paradi 2015 Assignment # 1 Due Tuesday Fe 12, 2019 Q1.(10 pts) Write a Java program that displays water bills. Your program should prompt the user to enter an integer account number, a character use code, and a real number representing the gallons of water used. The output from your program should include the account number, message indicating the type of usage, and the amount of money due from the user The water rates vary depending on the type of usage. A code of H means home use, a code of C means commercial use, and a code of I means industrial use. Any other code value should be treated as an error. Water rates are computed as ollows Code H: 5.00 KD plus 0.005 KD per gallon Code C 150.00 KD for the first 4 million gallons used plus 0.025 KD for each additional gallon usec 200.00 KD if usage does not exceed 4 million gallons 400.00 KD is usage is between 4 million and 10 million gallons 500.00 KD is 10 million gallons or more Q2. (5 pts) Using a switch statement, write a Java program that displays a student's status based on the following codes: Code Student Status 2. Sophomore Junior Senior Master program Doctoral program 5 6. Your program should accept the code number as a user entered input value and based on this value display the correct student status. If an incorrect code is entered, your program should display the string "An incorrect code was entered Page I of 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
