C++ using classes

design, implement and test a Rational number class that represents a rational number as a pair of integers instead of a single floating point number. The rational objects must be stored in their reduced form. A private member function reduce should be provided to reduce the Rational object. The rational clas should have two class constructors. The first one lets the client specify an initial numerator and denominator. The other default constructor creates the Rational number 0, represented as a numerator of 0 and a denominator of 1. The Rational class should have arthmetic operations that add, subtract, multiply and divide two Rational objects. These should be implemented as value-returning functions, each returning a Rational object. The Rational class should has a Bolean operation that compares two Rational objects for equality. The Rational class should have an input operation that reads a rational number from a designated input stream in the form numerator/denominator. The Rational class should have an output operation that writes a rational number out to a designated output stream in the form of numerator/denominator. Deploy "seperate compliation" development. Do not rename the files. rational.h contains the definition of the Rational class. You can only add member funtions to the class and that is all. [url removed, login to view] is the implementation file and must contain the implementation of Rational class member functions and any other supporting functions add the remaining Rational class member functions use gcd and reduce functions. [url removed, login to view] is the client file and contains function main and other supporting functions. Add the client code that uses Rational class to allow the user full testing capability only fillign the areas marked. Error checking should check for a denominator of zero and abort using the assert function if zero or a zero is formed.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete c++ source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.

## Platform

DOS console app

## Deadline information

must be in C++

Квалификация: Программирование на С, Техника, MySQL, PHP, Архитектура ПО, Тестирование ПО

Показать больше stream programming, programming definition, programming classes, programming class definition, pair programming, object c programming, integers form 1, gcd number, gcd 1, functions in c# programming, functions in c programming, functional programming in c, floating point integers, dos programming, definition of programming, c++ programming test, c programming input output, c programming functions, c programming function, c programming classes

О работодателе:
( 1 отзыв ) United States

ID проекта: #2885970



See private message.

$7 USD за 14 дней(-я)
(6 отзывов(-а))