JAVA Internet Service Provider An Internet service provider has three different
ID: 3847023 • Letter: J
Question
JAVA
Internet Service Provider
An Internet service provider has three different subscription packages for its customers:
Package 1: For $ 9.95 per month 10 hours of access are provided. Additional hours are $ 2.00 per hour. Package 2: For $ 14.95 per month 20 hours of access are provided. Additional hours are $ 1.00 per hour. Package 3: For $ 19.95 per month unlimited access is provided.
Write a program that calculates a customer’s monthly bill. It should ask which package the customer has purchased and how many hours were used. It should then display the total amount due.
It should also display how much money Package 1 customers would save if they purchased packages 2 or 3, and how much money Package 2 customers would save if they purchased Package 3. If there would be no savings, no message should be printed.
Your project should have at least 3 methods, in addition to the main.
The name of your class should be ISP
Input validation
If any input is invalid, keep asking for data, until they get it right
Only types 1-3 should be accepted
Months with 30 days have 720 hours, and months with 31 days have 744 hours. February, with 28 days, has 672 hours, February with 29 days has 696 hours.
Ask the user for the month and year validating that the number of hours entered is not more
than the maximum for the entire month. Remember you must check for leap year
http://www.timeanddate.com/date/leapyear.html
Which Years are Leap Years?
In the Gregorian calendar 3 criteria must be taken into account to identify leap years:
The year is evenly divisible by 4;
If the year can be evenly divided by 100, it is NOT a leap year, unless;
The year is also evenly divisible by 400. Then it is a leap year.
This means that 2000 and2400 are leap years, while 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years.
Explanation / Answer
#include using namespace std; int main() { char package; //double total_amount; //Even skipped this! int hours; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.