# Personal Project Assignment

1. Purpose: To gain experience using classes.

2. The Problem (an enhanced version of Chapter 11, Programming Problem 3, page 659): design, implement, and test a Rational class that represents a rational number as a pair of integers instead of a single floating-point number.

3. More Details:

A rational number is a number that can be expressed as a fraction whose numerator and denominator are integers. Examples of rational numbers are 0.75 (which is 3/4) and 1.125 (which is 9/8). The value p is not a rational number; it cannot be expressed as the ratio of two integers.

The Rational objects must be stored in their reduced form. In other words, the rational number 12/16 should be stored as 3/4. A private member function Reduce should be provided to reduce the Rational object.

The Rational class should have two class constructors. The first one lets the client specify an initial numerator and denominator. The other??"the default constructor??"creates the Rational number 0, represented as a numerator of 0 and a denominator of 1.

The Rational class should have arithmetic 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 have a Boolean 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 numerator/denominator.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete 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) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

## Platform

Operating System: Windows 2000/XP

Microsoft Windows Visual C++ 6.0

I will email the .cpp files stipulated in assignment.

( 0 comentários ) United States

ID do Projeto: #3062028

## Premiar a:

gworroll

See private message.

\$7 USD em 3 dias
(42 Avaliações)
3.7

## 6 freelancers estão ofertando em média \$8 para este trabalho

vw627017vw

See private message.

\$8.5 USD in 3 dias
(24 Comentários)
3.5
yaarali

See private message.

\$8.5 USD in 3 dias
(25 Comentários)
3.1
malis

See private message.

\$5.95 USD in 3 dias
(6 Comentários)
2.8
miraivw

See private message.

\$6.8 USD in 3 dias
(0 Comentários)
0.0
dmitryandrusenko

See private message.

\$8.5 USD in 3 dias
(1 Comentário)
0.0