Question: write a program on netbeans java language Problem #1: [20 pts a) An Intemet Service Provider has three different subscription offers for its customers: Offer

write a program on netbeans java language write a program on netbeans java language Problem #1: [20 pts a)

Problem #1: [20 pts a) An Intemet Service Provider has three different subscription offers for its customers: Offer A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour Offer B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour Write a method with the header below that accepts the offer type and the number of hours and returns the total charges: public static double charge(char offer, int hours) b) Write a program that reads the offer the customer has purchased (A or B) and the number of hours that were used, and then displays the total charges. If the offer is different than A and B. or the number of hours is negative, then the message "wrong entry is displayed. Sample run 1 Enter the desired offer and the number of hours: A 25 The total charges: $39.95 Ihint: there are 15 extra hours, the total charge is calculated as follows ($9.95 + $2.00 x 15 hours) Sample run 2 Enter the desired offer and the number of hours: D 50 Wrong entry Sample run 3 Enter the desired offer and the number of hours: B-50 Wrong entry Sample run 4 Enter the desired offer and the number of hours: B 30 The total charges: $23.95 hint: there are 10 extra hours, the total charge is calculated as follows ($13.95 + $1.00 x 10 hours)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!