How Software Gets Done  


Login

Software Buyers
Request bids
Search coders
My Buyer Account
Buyer help
Buyer articles
Buyer FAQ
Latest news
 
Software Coders
Newest open work
Browse all work
Search all work
My Coder Account
Coder help
Coder articles
Coder FAQ
Latest news
 
Affiliates
My Affiliate Account
Affiliate help
Affiliate FAQ
Latest news
 
Newest Bid Requests.
(See all)
Heads or Tails(Coin Toss)
By bsshoomez on Sep 25
Max Bid: $25


CanUHelpMe - Redesign Logo and Home Page
By Webpak on Sep 25
Max Bid: Open to fair suggestions


Splash Screen Graphic
By Byoni on Sep 25
Max Bid: Open to fair suggestions


Better Property Grid/Form (c#)
By QUIET on Sep 25
Max Bid: Open to fair suggestions


Add recurring billing to Paypal IPN script
By linny on Sep 25
Max Bid: $20


Create a desktop auction management program
By linny on Sep 25
Max Bid: $200


Click here to put this ticker on your own site and/or get live RSS newsfeeds

Open Work Categories.
Database 
(189 open)
   Access 
(63 open)
   MySQL 
(123 open)
   Oracle 
(11 open)
   SQL Server 
(70 open)
   Other DB 
(24 open)
Documentation / Tech Writing 
(25 open)
   Language (Human) Translations 
(11 open)
Data Entry 
(38 open)
Game Development 
(22 open)
Graphics / Art / Music 
(56 open)
   Graphics 
(57 open)
     Adobe AfterEffects 
(12 open)
     Adobe Photoshop 
(33 open)
     Adobe Premiere 
(9 open)
     3d Animation 
(18 open)
   Art (Misc.) 
(17 open)
   Music 
(8 open)
   Photography 
(5 open)
   3d Modeling 
(11 open)
Language Specific 
(117 open)
   Assembly / Machine language 
(18 open)
   ASP 
(69 open)
   ASP .NET 
(74 open)
   C# 
(69 open)
   C++ / C 
(171 open)
   Carbon (Mac OS) 
(3 open)
   Cocoa / Obj-C 
(5 open)
   Cold Fusion 
(9 open)
   Delphi 
(56 open)
   Java 
(98 open)
   JSP 
(14 open)
   Perl 
(51 open)
   Python 
(6 open)
   PHP 
(124 open)
   XML/XSL 
(35 open)
   Visual Basic 
(173 open)
   Visual Basic .Net 
(112 open)
   Other 
(74 open)
Misc 
(39 open)
   Middleware 
(1 open)
   CAD 
(5 open)
MultiMedia 
(27 open)
   Video Editing 
(5 open)
Network 
(40 open)
   Network Design 
(7 open)
   Network Implementation 
(7 open)
Platforms 
(72 open)
   Windows 
(186 open)
     MS Exchange 
(11 open)
     MS Office 
(27 open)
     Other 
(16 open)
   Darwin 
(3 open)
   Embedded Systems 
(13 open)
   Hand Held/PDA Programming 
(18 open)
   Internet Browser 
(54 open)
   Linux 
(72 open)
   Lotus Notes / Domino 
(2 open)
   UNIX 
(43 open)
Requirements 
(11 open)
Security 
(41 open)
Testing / Quality Assurance 
(16 open)
Web 
(162 open)
   Page Design 
(81 open)
   Flash 
(49 open)
   Marketing 
(15 open)
     Search Engine Optimization 
(10 open)
     Marketing (Other) 
(14 open)
   Web Services 
(84 open)
   Web (Other) 
(95 open)
Training 
(12 open)
   Computer Based 
(12 open)
Other
 
Other Sites

Download the free Rent A Coder IE toolbar!
 
Show Bid Request

modify Fraction program
Bid Request Id: 9170
Bookmark in my 'To Do' list
Posted by: mahdy50 (50 ratings)
(Software buyer rating 9.96)
Non-action Ratio: Very Good - 6.45%
Buyer Security Verifications: Excellent
Approved on: Feb 20, 2002
2:28:57 PM EDT
Bidding Closes: Feb 22, 2002 EDT
Viewed (by coders): 477 times
Phase:
100% of work completed and accepted. Coder has been paid.
Max Accepted Bid: Bidding is closed
Project Type: Personal Project / Homework Help
Bidding Type: Open Auction
Categories: Java
Enter chat room for this bid request
(0 active users at Sep 25, 2003 8:49:30 AM EDT)

Description:
modify the FractionalMath programe so it performes a partial input valdiation . If either fraction does not contian exactly one slash , have the program prompt the user to re-enter the fraction . The program will repeat the prompt as often as necessary until the user enters a string containing one slash.

Deliverables:
enter first fraction: 3/5
enter second fraction: 1/6

sum: 23/30
Difference :13/30
Product:3/30
Quotient 18/15


ALL OPERATIONS ARE THE CALLING OBJECT op F
*****/

import java.io.*;

public class Fraction
{

private int num,
den;


//Two constructor
public Fraction(int n, int d)
{
num = n; //Numerator
den = d; //Denominator

if(den < 0) {
num *= -1;
den *= -1;
}

}

//another constructor
//pass the fraction in the string like "1/2"
public Fraction(String f)
{
int i = 0;
boolean done = false;

while(!done) {
if(f.charAt(i) == '/')
done = true;
else
i++;
}

String n = f.substring(0, i);
String d = f.substring(i+1, f.length());

Integer i1 = new Integer(n);
num = i1.intValue();

Integer i2 = new Integer(d);
den = i2.intValue();

if(den == 0) { den *= -1; num *= -1; }

}

//default constructor
public Fraction()
{
num = 0;
den = 1;
}

////////////////////
//ALL OPERATIONS ARE THE CALLING OBJECT op F
// Fraction f;
// f.sub(f2); is f - f2
///////////////////

public Fraction add(Fraction f) //Add method
{
Fraction sum = new Fraction();

sum.den = den * f.den;
sum.num = num * f.den + f.num * den;

return sum;
}


public Fraction sub(Fraction f) //Subtract method
{
Fraction dif = new Fraction();

dif.den = den * f.den;
dif.num = num * f.den - f.num * den;

return dif;
}

public Fraction mul(Fraction f) //Multiply Method
{
Fraction prod = new Fraction();

prod.den = den * f.den;
prod.num = num * f.num;

return prod;
}

public Fraction div(Fraction f) //Divide method
{
Fraction quot = new Fraction();

quot.den = den * f.num;
quot.num = num * f.den;

return quot;
}


public void display()
{
System.out.print(num);
System.out.print('/');
System.out.print(den);
System.out.print(" ");
}

public static void main(String[] args)
{
Fraction f1, f2;

BufferedReader in = new BufferedReader(new InputStreamReader(System.in));


try {

Fraction f3 = new Fraction();

System.out.print("Enter first fraction: "); //First Prompts for the Input X/Y
String tmpstr_f1 = in.readLine();
f1 = new Fraction(tmpstr_f1);

System.out.print("Enter second fraction: "); //Second Prompt X/Y
String tmpstr_f2 = in.readLine();
f2 = new Fraction(tmpstr_f2);

f3 = f1.add(f2);
System.out.print("Sum :"); //Output of Sum
f3.display();

f3 = f1.sub(f2);
System.out.print("\nDifference :"); //Output of Difference
f3.display();

f3 = f1.mul(f2);
System.out.print("\nProduct :"); //Output of Products
f3.display();

f3 = f1.div(f2);
System.out.print("\nQuotent :"); //Output of Quotient
f3.display();

}
catch(IOException e) {
System.out.println("error");
}


}

}

Platform:
window melenium

Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.



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!
Kats Tanaka
(15 ratings)
in Arlington, Massachusetts
United States
Bid id: 107,690
 
$8 (USD) Feb 20, 2002
2:48:23 PM EDT
 10
(Excellent)
   
I can get this done in 1 hr if the given Java code has no bugs :-)

- Kats
 




Bid Request Search
 Advanced Search
Newest Open Work
Latest News  
Credentials


 

 
Rent A Coder upholds the rigorous business practices required to be both a BBB member and Square Trade vendor.
  • All customer issues addressed within 2 days
  • Openly disclosed pricing and return policies
  • Participation in mediation at buyer request
  • Superior selling track record
This site is verified through its parent company, Exhedra Solutions, Inc.
 
Top Coders.

Securenext
Rated a 9.97 on 124 jobs 
Buddies
Rated a 9.85 on 94 jobs 
Codman
Rated a 9.97 on 158 jobs 
hernest
Rated a 10 on 122 jobs 
Andrei Remenchuk
Rated a 10 on 14 jobs 
D-N-S
Rated a 9.93 on 39 jobs 
markesh
Rated a 10 on 23 jobs 
GribFritz
Rated a 9.89 on 152 jobs 
ASP.NET
Rated a 9.86 on 62 jobs 
PSergei
Rated a 9.77 on 108 jobs 

See all top coders...

(What makes a top coder?)

Top Exam Scorers

 
Other
Rent A Coder is PayPal verified through its parent company, Exhedra Solutions, Inc.

Created in partnership with:

 

Affiliate Sites
Latest News | About Us | Kudos | Feedback/Contact    Affiliates | Advertise    Privacy | Legal

Copyright © 2001, Exhedra Solutions, Inc. All rights reserved.
By using this site you agree to its Terms and Conditions.
"Rent A Coder" (tm), "Safe Project Escrow" (tm) and "How Software Gets Done" (tm)
are trademarks of Exhedra Solutions, Inc.