# Rational Numbers Calculator

This programming assignment is designed to teach how to write and use a fairly simple C++ class. The program needs a class called Rational. Its objects will be rational numbers. A rational number is a number of the form a/b where a and b are integer numbers (examples: 1/2, 17/45, 2/79). It needs to represent rational numbers as two private values of type int. One will be the numerator of the rational number and the other the denominator. Have to write two constructors for the class, one with no arguments (default constructor) and the other one with two arguments, used to initialize the member variables of an object in Rational. The default constructor initializes the rational number to 0 (that is numerator=0 and denominator=1). The class will also comprehend the two accessory functions get_num and get_den that return the value of numerator and denominator of a given rational number respectively and the set_num and set_den that set the value of numerator and denominator. The program gets the input from the screen and gives output both to the screen and the output file output.dat. Here's an example of screen output: ***** Rational numbers calculator ***** Be ready to enter numbers and operations in the format: 1/2 + 1/4 for the sum, 1/3 * 1/7 for the product. Operations are performed one at a time. Complete output appears in the file [url removed, login to view] 1/2+2/3 1/2+2/3=7/6 Would you like to do another computation? (y/n)y 1/4+3/2 1/4+3/2=14/8 Would you like to do another computation? (y/n)y 3/4*4/7 3/4*4/7=12/28 Would you like to do another computation? (y/n)n The file [url removed, login to view] will contain: 1/2+2/3=7/6 1/4+3/2=14/8 3/4*4/7=12/28 Not responsible for any input error. Notice that the result appears not in the simplified form (i.e., 14/8 should be 7/4, 12/28 should equal 6/7). Make the result appear simplified, that is in the form p/q where p and q have no common factors. It is required to use a minimum of 5 functions (not including the member functions).

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done (i.e., .exe and .cpp files). 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

All Windows platforms (95/98/2000/NT/Me/XP)

( 2 comentários ) United States

ID do Projeto: #2960021

## Premiar a:

russellsmithvw

See private message.

\$3 USD em 1 dia
(23 Avaliações)
3.4

## 59 freelancers are bidding on average \$19 for this job

progwriter

See private message.

\$59.5 USD em 1 dia
(620 Comentários)
7.7
ndima

See private message.

\$4.25 USD em 1 dia
(96 Comentários)
6.6
slavas71

See private message.

\$34 USD em 1 dia
(99 Comentários)
6.5
mihaiscortaru

See private message.

\$5.92 USD em 1 dia
(160 Comentários)
6.0
idleswell

See private message.

\$15.3 USD em 1 dia
(175 Comentários)
5.9
sawamu

See private message.

\$25.5 USD em 1 dia
(215 Comentários)
5.9
emilianbold

See private message.

\$4.25 USD em 1 dia
(77 Comentários)
5.8
kandamunlabs

See private message.

\$8.5 USD em 1 dia
(29 Comentários)
5.2
bramp

See private message.

\$8.5 USD em 1 dia
(84 Comentários)
5.1
yosevw

See private message.

\$8.5 USD em 1 dia
(30 Comentários)
5.0
projetcoder

See private message.

\$17 USD em 1 dia
(39 Comentários)
5.0
sabonzovw

See private message.

\$25.5 USD em 1 dia
(26 Comentários)
5.3
thecoder256

See private message.

\$25.5 USD em 1 dia
(33 Comentários)
4.6
szaszalexmcpd

See private message.

\$5.95 USD em 1 dia
(55 Comentários)
4.4
gchelidze

See private message.

\$17 USD em 1 dia
(14 Comentários)
4.4
vw821235vw

See private message.

\$6.8 USD em 1 dia
(94 Comentários)
4.3

See private message.

\$34 USD em 1 dia
(24 Comentários)
4.6
seirus

See private message.

\$17 USD em 1 dia
(36 Comentários)
4.0
ramgopal

See private message.

\$8.5 USD em 1 dia
(12 Comentários)
3.4
bubbla

See private message.

\$8.5 USD em 1 dia
(22 Comentários)
3.1