Find Jobs
Hire Freelancers

C++ Rational numbers class

$30-5000 USD

Completed
Posted almost 20 years ago

$30-5000 USD

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
Project ID: 3241245

About the project

32 proposals
Remote project
Active 20 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$9 USD in 7 days
5.0 (25 reviews)
3.1
3.1
32 freelancers are bidding on average $14 USD for this job
User Avatar
See private message.
$68 USD in 7 days
4.5 (66 reviews)
6.4
6.4
User Avatar
See private message.
$21.25 USD in 7 days
4.9 (212 reviews)
5.8
5.8
User Avatar
See private message.
$29.75 USD in 7 days
5.0 (51 reviews)
5.3
5.3
User Avatar
See private message.
$12.75 USD in 7 days
5.0 (22 reviews)
5.1
5.1
User Avatar
See private message.
$17 USD in 7 days
5.0 (221 reviews)
5.2
5.2
User Avatar
See private message.
$8.50 USD in 7 days
5.0 (21 reviews)
4.8
4.8
User Avatar
See private message.
$21.25 USD in 7 days
4.9 (15 reviews)
4.0
4.0
User Avatar
See private message.
$11.05 USD in 7 days
4.9 (51 reviews)
4.2
4.2
User Avatar
See private message.
$5.95 USD in 7 days
5.0 (39 reviews)
3.5
3.5
User Avatar
See private message.
$5.10 USD in 7 days
5.0 (29 reviews)
3.5
3.5
User Avatar
See private message.
$8.50 USD in 7 days
5.0 (19 reviews)
3.5
3.5
User Avatar
See private message.
$4.25 USD in 7 days
5.0 (8 reviews)
3.4
3.4
User Avatar
See private message.
$8.50 USD in 7 days
4.0 (17 reviews)
4.4
4.4
User Avatar
See private message.
$8.50 USD in 7 days
4.9 (42 reviews)
3.4
3.4
User Avatar
See private message.
$8.50 USD in 7 days
4.8 (10 reviews)
2.8
2.8
User Avatar
See private message.
$15.30 USD in 7 days
5.0 (9 reviews)
2.8
2.8
User Avatar
See private message.
$6.80 USD in 7 days
5.0 (8 reviews)
2.4
2.4
User Avatar
See private message.
$8.50 USD in 7 days
5.0 (7 reviews)
2.4
2.4
User Avatar
See private message.
$5.10 USD in 7 days
4.7 (7 reviews)
1.5
1.5
User Avatar
See private message.
$6.80 USD in 7 days
5.0 (3 reviews)
1.0
1.0

About the client

Flag of UNITED STATES
Cincinnati, United States
4.5
1
Member since Jun 7, 2004

Client Verification

Other jobs from this client

C++ SavingsAccount class
$30-5000 USD
Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.