Find Jobs
Hire Freelancers

C++ using classes

$30-5000 USD

完了済み
投稿日: 21年以上前

$30-5000 USD

完了時にお支払い
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++
プロジェクト ID: 2885970

プロジェクトについて

1個の提案
リモートプロジェクト
アクティブ 21年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
アワード者:
ユーザーアバター
See private message.
$7 USD 14日以内
5.0 (6 レビュー)
2.0
2.0

クライアントについて

UNITED STATESのフラグ
United States
5.0
1
メンバー登録日:11月 1, 2002

クライアント確認

このクライアントからの他の仕事

Array & sorrting
$30-5000 USD
ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。