Write a program named InternetCharge_YourLastName that do the following:

Write a program named InternetCharge_YourLastName that do the following:

An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 30 hours of access are provided. Additional hours are $1.00 per hour. Package B: For $24.95 per month 50 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $39.95 per month unlimited access is provided. Write a program named InternetCharge_YourLastName that do the following:

*display the menu as follow: 1. Package A 2. Package B 3. Package C 0. Exit

*Then prompt users to enter a number to select the service package. *prompt users to enter the used hours *display the total charge in the following format. The total charge will include the tax 8.5% on the price For example: Input: 1 45

Output: PACKAGE TYPE: A Used Hours: 45 Total charge: $26.58

All the calculation will be hidden from the application side.

Instruction: We should have two classes

  1. class named InternetService_YourLastName that hold the information of the Internet service that contains: serviceType as a letter (A, B or C) and the number of hours that users used during the month. Also, it has the method to calculate the total charge based on the package type and the used hours. The output will be built in the method the toString
  2. The controlling class or driver class with main method that contains all the tasks that the requirements ask for.
View Answers









Related Tutorials/Questions & Answers:

Ads