Teacher’s Pet is a software firm that specializes in children’s educational prog
ID: 3741125 • Letter: T
Question
Teacher’s Pet is a software firm that specializes in children’s educational programs. The firm has decided to develop a series of products that will help children discover the properties of fractions. As you plan the program series, you realize that a fraction contains at least two data properties: a numerator and a denominator. Therefore, you begin to think of specific fractions as objects that belong to the class called Fraction. For now, though, you decide to work with structs. Develop the Fraction struct so that it contains public data fields that hold the integers numerator and denominator. (In later chapters, you will change your data struc- ture to a class and learn to make these data fields private.) Write a main()function that declares a Fraction and allows you to enter data values for the two Fraction fields. Echo the input. Save the file as Fraction.cpp.
Any coding assignments will have to be submitted in .cpp format and a Word document with the code copy/pasted and screenshots of the output.
Explanation / Answer
Hi,
Check the below commented code.
Comments will answer most of your doubts. If you got any in specificd don't bother to ping me.
Hope this helps.
All the best
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.