Question: Objectives. 1. Students will apply basic constructs of programming languages to write programs. 2. Students will write correct, will-documented and readable programs in a reasonable

Objectives. 1. Students will apply basic
Objectives. 1. Students will apply basic constructs of programming languages to write programs. 2. Students will write correct, will-documented and readable programs in a reasonable amount of time. Problem Description: Declare and define a class for a fraction number. A fraction in mathematics is defined as a / bwhere a and b are integers and called numerator and denominator. Requirements Task1 Define a fraction class that has the following member functions: 0 constructor that initializes the fraction by default arguments. 0 set function that sets the numerator of the fraction. 0 set function that sets the denominator of the fraction. get function that returns the numerator of the fraction. 0 get function that returns the denominator of the fraction. O a function that displays the fraction. Write the class in header and implementation files, and compile it separately from the client program. Name the files as fraction.h and fraction.cpp. Document the class following the example of the point class posted on D2L. Write a test program to show all your member functions work before you move to Task2. Name your program as projectl_taskl.cpp

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 Mathematics Questions!