Find Jobs
Hire Freelancers

Rational Numbers Calculator

$30-5000 USD

Đã hoàn thành
Đã đăng vào gần 21 năm trước

$30-5000 USD

Thanh toán khi bàn giao
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 [login to view URL] 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 [login to view URL] 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)
Mã dự án: 2960021

Về dự án

57 đề xuất
Dự án từ xa
Hoạt động 21 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
Đã trao cho:
Avatar người dùng
See private message.
$3 USD trong 1 ngày
5,0 (23 nhận xét)
3,4
3,4
57 freelancer chào giá trung bình $18 USD cho công việc này
Avatar người dùng
See private message.
$59,50 USD trong 1 ngày
5,0 (620 nhận xét)
7,7
7,7
Avatar người dùng
See private message.
$34 USD trong 1 ngày
5,0 (99 nhận xét)
6,5
6,5
Avatar người dùng
See private message.
$4,25 USD trong 1 ngày
5,0 (96 nhận xét)
6,6
6,6
Avatar người dùng
See private message.
$5,92 USD trong 1 ngày
5,0 (159 nhận xét)
6,0
6,0
Avatar người dùng
See private message.
$15,30 USD trong 1 ngày
4,9 (201 nhận xét)
6,3
6,3
Avatar người dùng
See private message.
$4,25 USD trong 1 ngày
5,0 (77 nhận xét)
5,8
5,8
Avatar người dùng
See private message.
$25,50 USD trong 1 ngày
4,9 (215 nhận xét)
5,9
5,9
Avatar người dùng
See private message.
$8,50 USD trong 1 ngày
4,9 (64 nhận xét)
5,7
5,7
Avatar người dùng
See private message.
$8,50 USD trong 1 ngày
5,0 (30 nhận xét)
5,0
5,0
Avatar người dùng
See private message.
$17 USD trong 1 ngày
5,0 (39 nhận xét)
5,0
5,0
Avatar người dùng
See private message.
$8,50 USD trong 1 ngày
5,0 (84 nhận xét)
5,1
5,1
Avatar người dùng
See private message.
$5,95 USD trong 1 ngày
5,0 (54 nhận xét)
4,4
4,4
Avatar người dùng
See private message.
$17 USD trong 1 ngày
5,0 (14 nhận xét)
4,4
4,4
Avatar người dùng
See private message.
$25,50 USD trong 1 ngày
4,9 (33 nhận xét)
4,6
4,6
Avatar người dùng
See private message.
$6,80 USD trong 1 ngày
4,9 (94 nhận xét)
4,3
4,3
Avatar người dùng
See private message.
$17 USD trong 1 ngày
5,0 (36 nhận xét)
4,0
4,0
Avatar người dùng
See private message.
$25,50 USD trong 1 ngày
3,1 (26 nhận xét)
5,3
5,3
Avatar người dùng
See private message.
$4,25 USD trong 1 ngày
5,0 (37 nhận xét)
3,0
3,0
Avatar người dùng
See private message.
$34 USD trong 1 ngày
3,4 (24 nhận xét)
4,6
4,6
Avatar người dùng
See private message.
$11,05 USD trong 1 ngày
5,0 (4 nhận xét)
2,8
2,8

Về khách hàng

Cờ của UNITED STATES
Riverside, United States
5,0
2
Thành viên từ thg 7 30, 2003

Xác thực khách hàng

Các công việc khác từ khách hàng này

Test Score Distribution
$30-5000 USD
Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.