Its a java programming class i need help in doin this hw problem An Internet Ser
ID: 3620754 • Letter: I
Question
Its a java programming class i need help in doin this hw problemAn Internet Service Provider has three different subscriptionpackages for its customers:
Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.
Package B: For $14.95 per month 20 hours of access areprovided. Additional hours are $1.00 per hour.
Package C: For $19.95 per month unlimited access isprovided
Design a class that calculated a customer's monthly bill. It should store the letter of the package the customer haspurchased (A,B, or C) and the number of hours that were used. It should have a method that return the total charges. Demonstrate the class in a program that asks the user to select a package and enter the number of hours used. Theprogram should display the total charges. Part 2: Modify the program you wrote for programming so it also calculates and displays the amount of money Package A customers would save if they purchased Packages B or C, and the amount of money package B customers would save if they purchased package C. This has to be done seprepatly he told us to copy the program from above and just change it around to make it do all this stuff Its a java programming class i need help in doin this hw problem
An Internet Service Provider has three different subscriptionpackages for its customers:
Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.
Package B: For $14.95 per month 20 hours of access areprovided. Additional hours are $1.00 per hour.
Package C: For $19.95 per month unlimited access isprovided
Design a class that calculated a customer's monthly bill. It should store the letter of the package the customer haspurchased (A,B, or C) and the number of hours that were used. It should have a method that return the total charges. Demonstrate the class in a program that asks the user to select a package and enter the number of hours used. Theprogram should display the total charges. Part 2: Modify the program you wrote for programming so it also calculates and displays the amount of money Package A customers would save if they purchased Packages B or C, and the amount of money package B customers would save if they purchased package C. This has to be done seprepatly he told us to copy the program from above and just change it around to make it do all this stuff
Explanation / Answer
I find it a little difficult to not "give away the answer" without explaining the concepts to you, so if my answer seems a little loose, bear with me and try to follow along - I'll make it as clear as I can. When describing a class in English, if you say that the object "has a something," you are probably going to want to put that certain "something" as a field (or value) in the class. For example, in the case of a Clock, that "something" would be the time - all clocks have a time. Now, think about what you want - the user needs to input what kind of plan they want in such a way that the class can read it and take it into account as a field. How do you connect private, inaccessible values inside of a class to the user's input? Once you figure this out, you will be able to provide usable values to your class. If you've done the above, you may be able to do the methods without any more aid. For those, you're going to be using the values the user gave you above. For the total charges, just do some simple math involving the rates and hours used, and for plan comparison, do the same, but calculate the rates of the other plans as well and compare them to the user's plan.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.