Answered step by step
Verified Expert Solution
Question
...
1 Approved Answer
In C + + ; Long - Distance Calls A long - distance carrier charges the following rates for telephone calls: Write a program that
In C; LongDistance Calls A longdistance carrier charges the following rates for telephone calls: Write a program that asks for the starting time and the number of minutes of the call, and displays the charges. The program should ask for the time to be entered as a floatingpoint number in the form HHMM For example, : hours will be entered as and : hours will be entered as Input Validation: The program should not accept times that are greater than : Also, no number whose last two digits are greater than should be accepted. Hint: Assuming num is a floatingpoint variable, the following expression will give you its fractional part: num staticcast Design a class named Time that holds three attributes: a Declare one attribute called hours of integer data type. b Declare one attribute called minutes of integer data type. c Declare one attribute called seconds of integer data type. Design a class named LongDistance that holds two attributes: a Declare one attribute called startingTimeOfCall of Time datatype. b Declare one attribute called timeElapsed of Time datatype. c Implement a member function that calculates the minutes of timeElapsed variable. d Compute and display the charges of the call. Use military format time in your program calculations. Implement Constructors, Destructor, Copy Constructor, mutators, and accessor functions in your code. Overload operators' insertionextraction in your classes. The solution must contain the following: a Source code. b Output Code. c Tables descriptive for every Class. d UML diagram of the Classes Composition. e CRC card.LongDistance Calls A longdistance carrier charges the following rates for telephone calls: Starting Time of Call Rate per Minute :: :: :: Write a program that asks for the starting time and the number of minutes of the call, and displays the charges. The program should ask for the time to be entered as a floatingpoint number in the form HHMM For example, : hours will be entered as and : hours will be entered as Input Validation: The program should not accept times that are greater than : Also, no number whose last two digits are greater than should be accepted. Hint: Assuming num is a floatingpoint variable, the following expression will give you its fractional part: num staticcastnum Ii Design a class named Time that holds three attributes: a Declare one attribute called hours of integer data type. b Declare one attribute called minutes of integer data type. c Declare one attribute called seconds of integer data type. Design a class named LongDistance that holds two attributes: a Declare one attribute called startingTimeOfCall of Time datatype. b Declare one attribute called timeElapsed of Time datatype. c Implement a member function that calculates the minutes of timeElapsed variable. d Compute and display the charges of the call. Use military format time in your program calculations. Implement Constructors, Destructor, Copy Constructor, mutators, and accessor functions in your code. Overload operators insertionextraction in your classes. The solution must contain the following: a Source code. b Output Code. c Tables descriptive for every Class. d UML diagram of the Classes Composition. e CRC card.
In C;
LongDistance Calls
A longdistance carrier charges the following rates for telephone calls:
Write a program that asks for the starting time and the number of minutes of the call, and displays the
charges. The program should ask for the time to be entered as a floatingpoint number in the form
HHMM
For example, : hours will be entered as and : hours will be entered as
Input Validation: The program should not accept times that are greater than : Also, no number whose
last two digits are greater than should be accepted.
Hint: Assuming num is a floatingpoint variable, the following expression will give you its fractional part:
num staticcast Design a class named Time that holds three attributes:
a Declare one attribute called hours of integer data type.
b Declare one attribute called minutes of integer data type.
c Declare one attribute called seconds of integer data type.
Design a class named LongDistance that holds two attributes:
a Declare one attribute called startingTimeOfCall of Time datatype.
b Declare one attribute called timeElapsed of Time datatype.
c Implement a member function that calculates the minutes of timeElapsed
variable.
d Compute and display the charges of the call. Use military format time in
your program calculations.
Implement Constructors, Destructor, Copy Constructor, mutators, and accessor
functions in your code.
Overload operators' insertionextraction in your classes.
The solution must contain the following:
a Source code.
b Output Code.
c Tables descriptive for every Class.
d UML diagram of the Classes Composition.
e CRC card.LongDistance Calls
A longdistance carrier charges the following rates for telephone calls:
Starting Time of Call Rate per Minute
::
::
::
Write a program that asks for the starting time and the number of minutes of the call, and displays the charges. The program should ask for the time to be entered as a floatingpoint number in the form HHMM For example, : hours will be entered as and : hours will be entered as
Input Validation: The program should not accept times that are greater than : Also, no number whose last two digits are greater than should be accepted.
Hint: Assuming num is a floatingpoint variable, the following expression will give you its fractional part:
num staticcastnum
Ii Design a class named Time that holds three attributes:
a Declare one attribute called hours of integer data type.
b Declare one attribute called minutes of integer data type.
c Declare one attribute called seconds of integer data type.
Design a class named LongDistance that holds two attributes:
a Declare one attribute called startingTimeOfCall of Time datatype.
b Declare one attribute called timeElapsed of Time datatype.
c Implement a member function that calculates the minutes of timeElapsed variable.
d Compute and display the charges of the call. Use military format time in your program calculations.
Implement Constructors, Destructor, Copy Constructor, mutators, and accessor functions in your code.
Overload operators insertionextraction in your classes.
The solution must contain the following:
a Source code.
b Output Code.
c Tables descriptive for every Class.
d UML diagram of the Classes Composition.
e CRC card.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp)
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Step: 3
![blur-text-image](https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp)
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started