assignment 2

完了済み 投稿 Feb 4, 2015 着払い
完了済み 着払い

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.

C++プログラミング

プロジェクトID: #7089064

プロジェクトについて

5個の提案 リモートプロジェクト アクティブ Feb 5, 2015

アワード:

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 1日以内
(57レビュー)
5.2

5人のフリーランサーが、平均$26 で、この仕事に入札しています。

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 1日以内
(180件のレビュー)
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 1日以内
(47件のレビュー)
4.8
filterkapi

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

$25 CAD 1日以内
(24件のレビュー)
4.5
dinhks

A proposal has not yet been provided

$30 CAD 1日以内
(10件のレビュー)
3.8