SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 235 Weeks Ago, 4 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 20 May 2017 My Price 10.00

C++ program that computes the cost of a long-distance call.

Write a C++ program that computes the cost of a long-distance call.

The cost of the call is determined according to the following rate schedule:

   a. Any call started between 8:00 A.M. and 6:00 P.M., Monday through Friday, is billed at a rate of $0.40 per minute.

   b. Any call starting before 8:00 A.M. or after 6:00 P.M., Monday through Friday, is charged at a rate of $0.25 per minute.

   c. Any call started on a Saturday or Sunday is charged at a rate of $0.15 per minute.

The input will consist of the day of the week, the time the call started, and the length of the call in minutes. The output will be the cost of the call. The time is to be input in 24-hour notation, so the time 1:30 P.M. is input as (must be the following format:)

13:30

The day of the week will be read as one of the following pairs of character values, which are stored in two variables of type char:

Mo Tu We Th Fr Sa Su

Be sure to allow the user to use either uppercase or lowercase letters or a combination of the two. The number of minutes will be input as a value of type int. 

Format your output to two decimal places.

 

***Validate the user's input using an user-defined function(s).

***Calculate the cost using an user-defined function(s).

***Allow the user to repeat the program.

 

**************************************************************************************

OUTPUTS:

**************************************************************************************

 

 

Enter the first two letters of the day of the week:

Fr

Enter the time the call starts in 24-hour rotation:

20:10

Enter the length of the call in minutes:

10

Cost of the call: $2.50

 

Do you want to repeat the program?

y

 

Enter the first two letters of the day of the week:

Su

Enter the time the call starts in 24-hour rotation:

10:10

Enter the length of the call in minutes:

10

Cost of the call: $1.50

 

Do you want to repeat the program?

n

Answers

(15)
Status NEW Posted 20 May 2017 03:05 AM My Price 10.00

-----------

Attachments

file 1495250292-Solutions file.docx preview (51 words )
S-----------olu-----------tio-----------ns -----------fil-----------e -----------Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k y-----------ou -----------for----------- yo-----------ur -----------int-----------ere-----------st -----------and----------- bu-----------yin-----------g m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l b-----------e q-----------uic-----------kly----------- on-----------lin-----------e a-----------nd -----------giv-----------e y-----------ou -----------exa-----------ct -----------fil-----------e a-----------nd -----------the----------- sa-----------me -----------fil-----------e i-----------s a-----------lso----------- se-----------nt -----------to -----------you-----------r e-----------mai-----------l t-----------hat----------- is----------- re-----------gis-----------ter-----------ed -----------onÂ----------- th-----------is -----------web-----------sit-----------e -----------Tha-----------nk -----------you----------- -----------
Not Rated(0)