Show Bid Request
Fractions Program
Bid Request Id: 29626
|
|
|
Posted by: |
rm54 (3 ratings)
(Software buyer rating 9.66)
|
Non-action Ratio: |
Below Average - 58.82%
|
Posted: |
Oct 2, 2002 8:25:52 PM EDT
|
Bidding Closes: |
Oct 4, 2002 10:00:00 PM EDT
|
Viewed (by coders): |
360 times
|
Deadline: |
10/6/2002 8:00:00 AM
TIME EXPIRED
|
|
|
|
Description:
Part 1: Fraction
Some Definitions: An improper fraction is one whose magnitude of its numerator is larger than the magnitude of its denominator. A proper fraction is one where the magnitude of the numerator is smaller than the denominator. A mixed fraction is a fraction with a whole number and a proper fraction. For example, 5/4 is an improper fraction. It is equivalent to 1 1/4 which is a mixed fraction.
The first part is to write a class called Fraction to handle fractions in Java. The fractions can either be proper or improper (there's really no difference as far as the methods are concerned). The class should have methods to add, subtract, multiply and divide fractions and whole numbers. Thus, there are 8 arithmetic methods to be implemented. These methods should not return anything. For example, if f represents the fraction 3/4 and g represents the fraction 1/2, then calling f.add (g) makes f represent the fraction 5/4 while g still represents 1/2. In addition, you should also provide toString, equals and appropriate get/set methods. Finally, there should be 3 constructors, one that takes no arguments, one that takes a whole number (numerator) and one that takes both a numerator and denominator.
It is up to you on how you store the fractions. I would suggest you use longs for the numerator and denominator. I would also suggest you set things up so that the denominator is always positive (i.e., keep the sign in the numerator). That will make some of the arithmetic operations easier. The toString method should return the numerator and denominator in reduced form separated by a `/', or the word ``Infinite'' if the denominator is equal to 0. For example, toString for the fraction with numerator of -2 and denominator of 4 would return ``-1/2''. You do not need to keep the fraction in reduced form. You could wait until toString is called to do the reduction.
Part 2: MixedFraction
Now write a second class called MixedFraction that extends the Fraction class you wrote for part 1. The MixedFraction class should implement all of the methods that Fraction does, but for mixed fractions.
What to submit
You will submit a total of 4 java files. Two of them will be the Fraction.java and MixedFraction.java files. The other two will be driver programs that test out the Fraction and MixedFraction classes.
Implement all of the methods described above, and have the driver programs test each one.
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) The program must meet the above specifications EXACTLY. Do not add any "extra features".
3) Complete ownership and distribution copyrights to all work purchased.
4) Do not bid on this project if you cannot meet the deadline! A missed deadline will result in a poor rating.
Platform:
This program is to be written in Java so it is platform independent.
Must be 100% finished and received by buyer on:
Oct 6, 2002 8:00:00 AM EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Special Conditions / Other:
All work must be completed by 10/6/2202, 8:00am, EST. No exceptions! If you can't meet the deadline, don't bid!
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Oct 2, 2002 9:40:43 PM EDT
|
9.4
(Superb)
|
|
|
HI rm54!
I have an exam tomorrow morning. After that exam, I can do this for you.
I have written a fraction calculator already, and can modify it for you.
I have done 2 projects for you already here, and like you as a buyer, and would like to help again.
So I can have it to you tomorrow.
Regards, Bradley Andersen aka elohmrow |
|
|
|
|
|