Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming Design and develop a program for Long-Distance Calls. A Long-Distance carrier charges the following rates for long distance calls: Start Time of Call

C++ programming

Design and develop a program for Long-Distance Calls. A Long-Distance carrier charges the following rates for long distance calls:

Start Time of Call Rate per Minutes 00:00-07:59 0.07, 08:00-18:59 0.12 , and 19:00-2359 0.28. Your program should prompt the user and ask for the starting time and number of minutes of the call and displays the charges. The program should ask for the starting time to be entered as floating-point number in the form of HH.MM (for example 09:00 would be entered as 09.00).

INPUT VALIDATION: Your program should not accept HH that less than 0, nor greater than 23. Minutes less than zero and greater than 59 are invalid. Number of hours and minutes should be only accepted as a positive number.

DESIGN YOUR OWN OUTPUT TO SHOW START-TIME OF CALL, END-TIME OF THE CALL, RATE PER MINUTES, AND TOTAL CHARGE FOR THE CALL. (WHEN THEN END-TIME IS GREATER THAN 23:59 OUTPUT A TEXT NEXT DAY AFTER THE END-TIME. AND ADJUST THE END-TIME TO PROPER HH:MM)

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions