Question: C++ : Learning Objective Coding and testing of functions given a detailed design General Description You are to write and test a set of functions

C++ :

C++ : Learning Objective Coding and testing of functions given a detaileddesign General Description You are to write and test a set of

Learning Objective Coding and testing of functions given a detailed design General Description You are to write and test a set of functions dealing with a Fraction, based on detailed function designs. You will also write a main program to allow the user to test the functions. Detailed Design Specifications 1. Write a function called PrintLogo that prints a logo with your name FRACTION FUN by Albert Einstein 2. Write a function called AskFraction which asks the user to enter a numerator and a denominator. The function should assume the user enters integers, but should validate the denominator as not 0...it should repeatedly ask the user to re-enter the denominator when they enter 0. The function "returns" the numerator and denominator entered by using pass-by- reference arguments. 3. Write a function called DecimalValue which is given the numerator and denominator of a fraction, then calculates and returns the decimal value of the fraction (ex: results in 0.5) Write a function called PrintFraction which is given a numerator and a denominator and prints the fraction with a "/". Example: n-2, d-3 prints*2/3". 4. Finally, write a main function to test the functions you wrote. It should Declare any needed variables Invoke Printlogo - Invoke AskFraction to obtain a numerator and denominator -nvoke DecimalValue to obtain the decimal value of the numerator and denominator returned from AskFraction. - Print the decimal value with a message: "The decimal value is" decimalValue. This must be printed in main), not the DecimalValue function -nvoke PrintFraction with the numerator and denominator returned from AskFraction. -End with the normal system pause

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!