Write a program named InternetCharge_YourLastName that do the following:



Share on Google+Share on Google+

fareeha shabbir
Write a program named InternetCharge_YourLastName that do the following:
0 Answer(s)      4 years and 6 months ago
Posted in : Java Beginners

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:
Java Spring Hibernate Struts Training How do beginners learn about Java? ClassNotFoundException HttpRequestInterceptor java.lang.noclassdeffounderror: org/apache/http/httprequest noclassdeffounderror: org/apache/http/client/methods/httpurirequest java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient How do I resolve this Java Class not found exception? httpclient java.lang.NoClassDefFoundError Apache Commons ioutils maven dependency Read/Convert an inputStream to a String What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history


Advertisement null