Download as:
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Language:EN
Pages: 3
Words: 637

And function that shows the time public function members

You should then use this class in a program that multiplies fractions. (Hint: you can create 3 fraction objects f1, f2, and f3. You can use the public function readFraction that reads 2 fractions f1 and f2. You can then use the statement f3 = f1.multiply(f2) to calculate f1 * f2 and assign the result to f3.)

The function's input prompts should be "Enter 1st fraction" and "Enter 2nd fraction" where the user enters the appropriate fractions. In addition, the program needs to display the result of the multiplication operation in the readable format:

  • The first integer should represent the hour.

  • The second integer should represent the minutes.


(Hint: Design the CheapWatch class where the 3 integers representing time are to be treated as private data members. Include a standard constructor, a type conversion constructor, and a function that shows the time as public function members. In your design, identify with a comment the constructor member function. Ask the user to enter the number of seconds after midnight; output the seconds converted to military time. Make sure the output is formatted properly with appropriate manipulators, formatting flags and formatting functions.)

Section B: Complete either question 1 or question 2 in Section B.

Create a program that uses this function template, passing in two arguments of type int, char (single character), float, and a string variable.

Display appropriate output on the screen.

Copyright © 2009-2023 UrgentHomework.com, All right reserved.