Find Jobs
Hire Freelancers

C++ using classes

$30-5000 USD

Completed
Posted over 21 years ago

$30-5000 USD

Paid on delivery
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. [login to view URL] 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. [login to view URL] 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++
Project ID: 2885970

About the project

1 proposal
Remote project
Active 21 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.
$7 USD in 14 days
5.0 (6 reviews)
2.0
2.0

About the client

Flag of UNITED STATES
United States
5.0
1
Member since Nov 1, 2002

Client Verification

Other jobs from this client

Array & sorrting
$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.