Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Console application that does the following: 1. Asks the user to input i

ID: 3637790 • Letter: W

Question

Write a Console application that does the following:
1. Asks the user to input its package letter (1, 2, or 3) and the number of hours that he accessed the Internet, calculate the total charges according to the pricing scheme described below, and then display it on the screen. The pricing scheme is as follows:
„h Package 1: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.
„h Package 2: For $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour.
„h Package 3: For $19.95 per month unlimited access are provided.
2. Asks the user to enter the cost of an item, computes the depreciated value of the item over a period of N years, and display the depreciation schedule for the item in the format shown in the sample output below. Please format the output to align the values in column as shown below.
The depreciated value of the item should be computed according to the double-declining balance method of depreciation i.e. each year except for the last year, the item depreciates by (2/N)ths of its value at the beginning of that year; in the last year it is depreciated by its value at the beginning of that year.
Sample Output:
Enter package: 1
Enter hours: 20.5
Charges: $30.95
Enter cost of the item: 2000.0
Enter estimated life: 5
Year Start Value Amt Depreciated Total Depreciation
1 $2000.00 $800.00 $800.00
2 $1200.00 $480.00 $1280.00
3 $720.00 $288.00 $1568.00
4 $432.00 $172.80 $1740.80
5 $259.20 $259.20 $2000.00

REMEMBER THIS IS FOR JAVA

Explanation / Answer

You have 2 different questions here. You need to split them and post. I have the answer for first question. public class Internetcharge { public static void main(String[] args) { System.out.println("Enter package"); int pkg = input.nextInt(); System.out.println("Enter hours"); double hrs = input.nextInt(); double hrs_over_limit=0; double total_charge=0; if (pkg == 1) { if hrs > 10 { hrs_over_limit=hrs-10; total_charge= 9.95 + (hrs_over_limit * 2); } else { total_charge=9.95 } } else if (pkg == 2) { if hrs > 20 { hrs_over_limit=hrs-20; total_charge= 14.95 + (hrs_over_limit *1); } else { total_charge=14.95 } } else if pkg == 3 { total_charge=19.95 } else { System.out.println("Invalid input");} System.out.println("Total charge=" + total_charge); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote