i have a question

April 7, 2011 at 09:09:18
Specs: Windows 7
I dont know how to write the code for this
An Internet service provider has three different subscription packages 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 are provided. Additional hours are $1.00 per hour.
Package C: For $19.95 per month unlimited access is provided.

we have to Write a well-documented program that calculates a customer’s monthly bill. When the program starts, it asks a user to enter which package he/she purchased, which month the bill is for, and how many hours (in integer) were used in that month. The range of the valid hours (in integer) for each month is given as below. The program should check the validity of all input data. If there is invalid input data, such as incorrect package name, month name, or out-of-range hours, the program should display an appropriate message to indicate the incorrect input data, and terminate. Otherwise, the program computes and displays the bill in an easy-to-read format with the information of which month, package name, monthly fee, additional hours, extra charge for the additional hours, and the total cost for the customer. Also, the program should check for possible savings with the other packages. If any package(s) would save money for the customer, the program should display the package name(s) and the respective savings on the screen. If no other package would have provided a better deal for the customer, the program should display “Congratulations, smart shopper. You made a good choice.”. Note, the design of the interface between a user and the program is up to you. However, it should be informative, instructive and easy for a user to read and follow, i.e. he/she should be able to tell when and what kind of data (integer, character, string, etc.) is expected by following the instructions on the screen when he/she runs the program.

Month Hours Month Hours Month Hours

January 0~744 February 0~672 March 0~744
April 0~720 May 0~744 June 0~720
July 0~744 August 0~744 September 0~720
October 0~744 November 0~720 December 0~744

*** Fyi we use digtal Studio

See More: i have a question

Report •

April 7, 2011 at 13:47:23
First layout a flow chart of the program,

Report •

April 8, 2011 at 08:21:43
using namespace std;

void main( )
string file, filepath, package;
int bill, monthlyBill, hours, additionalHours;

float additionalhourFee, finalBill;
cout<<"please entererd which package was purchg (Example A,B,C):"<<endl;
cout<<"please enter which monthly bill is for(Example January):"<<endl;
cout<<"please enter the hours of use for billing month:"<<endl;
and i m stuck here no clue wht to do next

Report •

Related Solutions

Ask Question