C++ Rational numbers class

Completed Posted Jun 9, 2004 Paid on delivery
Completed Paid on delivery

Create a class called **Rational** for performing arithmetic with fractions. Write a driver program to test the class.

Use integer variables to represent the **private** data of the class ??" the numerator and the denominator. Provide a constructor function that enables an object of this class to be initialized when it is declared. The constructor should contain default values in case no initializers are provided and should store the fraction in reduced form (i.e. the fraction 2/4 would be stored in the object as 1 in the numerator and 2 in the denominator). Provide **public** member functions for each of the following:

a) Addition of two **Rational** numbers. The result should be stored in reduced form

b) Subtraction of two **Rational** numbers. The result should be stored in reduced form

c) Multiplication of two **Rational** numbers. The result should be stored in reduced form

d) Division of two **Rationa**l numbers. The result should be stored in reduced form

e) Printing **Rational** numbers in the form **a/b** where **a** is the numerator and **b** is the denominator

f) Printing **Rational** numbers in floating-point format.

## Deliverables

1)This is for a basic C++ class so no programming that a beginner would not know.

2) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

3) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

4) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

operates on any C++ program

C Programming Engineering MySQL PHP Software Architecture Software Testing

Project ID: #3241245

About the project

35 proposals Remote project Active Jun 10, 2004

Awarded to:

yaarali

See private message.

$9 USD in 7 days
(25 Reviews)
3.1

35 freelancers are bidding on average $15 for this job

DanD

See private message.

$21.25 USD in 7 days
(212 Reviews)
5.8
directsoftvw

See private message.

$34 USD in 7 days
(85 Reviews)
6.0
unamigo

See private message.

$29.75 USD in 7 days
(51 Reviews)
5.3
phillippalk

See private message.

$12.75 USD in 7 days
(22 Reviews)
5.1
chris0746

See private message.

$8.5 USD in 7 days
(21 Reviews)
4.8
rainbow

See private message.

$68 USD in 7 days
(44 Reviews)
5.8
lostbard

See private message.

$17 USD in 7 days
(221 Reviews)
5.2
Astalavist4

See private message.

$21.25 USD in 7 days
(18 Reviews)
4.1
terrastel

See private message.

$11.05 USD in 7 days
(51 Reviews)
4.2
grayfacedbu

See private message.

$5.95 USD in 7 days
(39 Reviews)
3.5
abirovw

See private message.

$5.1 USD in 7 days
(29 Reviews)
3.5
seneca

See private message.

$8.5 USD in 7 days
(19 Reviews)
3.5
pepelaz

See private message.

$4.25 USD in 7 days
(8 Reviews)
3.4
shahidriazonline

See private message.

$8.5 USD in 7 days
(17 Reviews)
4.4
thextvw

See private message.

$8.5 USD in 7 days
(42 Reviews)
3.4
codescripter

See private message.

$8.5 USD in 7 days
(10 Reviews)
2.8
colinjeanne

See private message.

$15.3 USD in 7 days
(9 Reviews)
2.8
mhasanca

See private message.

$6.8 USD in 7 days
(8 Reviews)
2.4
SimplrSolutions

See private message.

$8.5 USD in 7 days
(7 Reviews)
2.4
bitterbit

See private message.

$5.1 USD in 7 days
(7 Reviews)
1.5