complete class definition
38721Introduction
The Object Oriented software model is designed to create a new data type by using the
Class structure. Therefore the various operations which define a data type, such as the
common operators, assignment, etc., have a software architecture available to create
those operations and data types.
Assignment Description
This assignment is an exercise in creating a complete class definition. A standard way to
do that is to use a math data type. Here we define a Rational Number data type in a class
called “Rational”. The distinctive feature of this type is the data is kept as numerator and
denominator throughout all operations; there is no floating point representation used. The
standard math operations, addition, subtraction, etc., are implemented, including the
iostream overload. The student will not only come to understand what is required for a
complete representation of such a type, but also learn about the internal mechanics of its
C++ implementation.
The student will be given the Rational.h header file. The student will complete the class
definition by creating the Rational.cpp file.
Program Requirements
1. The student will create the Rational.cpp implementation for a class called Rational.
The interface for the Rational class will be provided with all applicable method
declarations.
2. The student will create the implementation for all methods defined in the header by
creating the file named Rational.cpp. There may be additional helper methods
defined as needed by the implementation.
3. The student will create a test driver to test each of the methods defined in the class.
The test driver file will be called TestRational.cpp.
4. The student will submit the source file for the test driver, TestRational.cpp, and the
Rational.cpp file.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.