assignment 2

Completado Publicado Feb 4, 2015 Pagado a la entrega
Completado Pagado a la entrega

Q1. Create a class called Rational for performing arithmetic with fractions. Write a program to test your class.

Use integer variables to represent the private data of the class – the numerator and the denominator. Provide a constructor that enables an object of this class to be initialized when it is declared. The constructor should contain default values in case no initialisers are provided and should store the fraction in reduced form. For example, the fraction 2/4, should be stored in the object as 1 in the numerator and 2 in the denominator. Provide public member functions that perform each of the following tasks:

• Adding two Rational numbers. The result should be stored in reduced form.

• Subtracting two Rational numbers. The result should be stored in reduced form.

• Multiplying two Rational numbers. The result should be stored in reduced form.

• Dividing two Rational numbers. The result should be stored in reduced form.

• Printing Rational numbers in the form a/b, where a is the nominator and b is the denominator.

• Printing Rational numbers in floating point format.

Programación en C++

Nº del proyecto: #7089064

Sobre el proyecto

5 propuestas Proyecto remoto Activo Feb 5, 2015

Adjudicado a:

urmate

HI Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif

$20 CAD en 1 día
(57 comentarios)
5.2

5 freelancers están ofertando un promedio de $26 por este trabajo

it2051229

Hi, its me again. I would like to work with you again if given the opportunity. I have read the requirements and I would like to do this project. Let me know if you are interested. Thanks.

$30 CAD en 1 día
(180 comentarios)
6.0
vietcompro

Hi there, I'm used to do similar projects like this one, so really hope to have chance to work with you, thanks for your consideration! Regards.

$25 CAD en 1 día
(47 comentarios)
4.8
filterkapi

Hello I can deliver the assignment in 24 hours time. Let's discuss . Thanks..........................

$25 CAD en 1 día
(24 comentarios)
4.5
dinhks

A proposal has not yet been provided

$30 CAD en 1 día
(10 comentarios)
3.8