Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

it's a java programm and it's the final so plz hurry and I'll rate up immediately i have 1 hour PART 2 Problem #1: (20

it's a java programm and it's the final so plz hurry and I'll rate up immediately i have 1 hour

image text in transcribed

PART 2 Problem #1: (20 pts a) An Internet 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 Enter the desired offer and the number of hours: A 25 The total charges: $39.95 hint: there are 15 extra hours, the total charge is calculated as follows (59.95 + $2.00 x 75 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 Enter the desired offer and the number of hours: B 30 The total charges: $23.95 Whint: there are 10 extra hours, the total charge is calculated as follows ($13.95 + $7.00 x 10 hours) 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

What does operating leverage measure, and how is it computed?

Answered: 1 week ago