Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

FOR ATL PROG PART I Basic Requirements [COMMENTS REQUIRED] Write

 
ATLPROG's Avatar
  • Answered by:ATLPROG
  • Computer Software Engineer
  • Positive Feedback: 99.8 %
  • Accepted Answers: 7397
Verified Expert
in Programming

Recent Feedback

Positive
nice
Positive
ATL Prog is the man! Great support.
Positive
A++++++ with JAVA again!! Thanks for the great help and service!
Positive
Very helpful yet again
Positive
This is just what I needed and ATLPROG completed it quickly.
Positive
Very fast, excellent and the best in this field. Recommended!
Positive
So Smart and have Great Knowledge
Positive
Thanks man. Compared to what I had coded up, I started out good, but then took...
Positive
I cant afford much more than I have already paid, but let me know if you want...
Positive
Thanks again and again

Customer Question

FOR ATL PROG

PART I

Basic Requirements [COMMENTS REQUIRED]

Write a driver and fraction class that performs addition, multiplication, prints the fraction, and prints as a double.


LastNameFirstNameProg7.java

Provide a driver class, LastNameFirstNameProg7, that demonstrates this Fraction class. The driver class should contain this main method:

public static void main(String[] args)
{
Scanner stdIn = new Scanner(System.in);
Fraction c, d, x; // Fraction objects



System.out.println("Enter numerator; then denominator.");
c = new Fraction(stdIn.nextInt(), stdIn.nextInt());
c.print();

System.out.println("Enter numerator; then denominator.");
d = new Fraction(stdIn.nextInt(), stdIn.nextInt());
d.print();

x = new Fraction(); // create a fraction for number 0

System.out.println("Sum:");
x.add(c).add(d);
x.print();
x.printAsDouble();

x = new Fraction(1, 1); // create a fraction for number 1

System.out.println("Product:");
x.multiply(c).multiply(d);
x.print();
x.printAsDouble();

System.out.println("Enter numerator; then denominator.");

x = new Fraction(stdIn.nextInt(), stdIn.nextInt());
x.printAsDouble();
} // end main




PART II

Fraction.java

Write a Fraction class called Fraction.java that implements these methods:

add - This method receives a Fraction parameter and adds the parameter fraction to the calling object fraction.

multiply - This method receives a Fraction parameter and multiplies the parameter fraction by the calling object fraction.

print - This method prints the fraction using fraction notation (1/4, 21/14, etc.)

printAsDouble - This method prints the fraction as a double (0.25, 1.5, etc.)
Separate accessor methods for each instance variable in the Fraction class.

Submitted: 780 days and 11 hours ago.
Category: Programming
Value: $22
Status: CLOSED

Accepted Answer

Picture
Expert:  ATLPROG replied780 days and 11 hours ago.


ATLPROG :

I can help you with this

Customer :

Great!! I was crossing my fingers that you would be able to

Customer :

It seems like a difficult program but thats probably cause programming still isnt my glitch :-) I just need the program files prior to 12 CST tonight. Will that be possible?

Customer :

Is there anything else you need from my end or do i just need to await your response?

ATLPROG :

yes i will start working on it now

ATLPROG :

Please download the program from Answer Link

Customer :

my apologies...i got disconnect. reviewing the program now.

ATLPROG :

ok

Customer :

On my last program from this past week, the instructor gave me 64 out of 80. He noted Your program class name for the driver is wrong, won't allow it to compile.
"Your style is also way off, the {'s are in the wrong place and you have many un-needed accessor methods. It looks like you used eclipse or netbeans, they both do it wrong."

Customer :

Will he be encountering the same error message with this program?

ATLPROG :

what do you mean by {'s are in wrong place

Customer :

thats what he had on his feedback

ATLPROG :

i do use Eclipse

Customer :

i didnt change or modified anything that you sent me. I just saved it under a different name and sent it to him

ATLPROG :

i can change it so that { are in the next line instead of same line

ATLPROG :

maybe thats what would satisfy him

Customer :

could you please

Customer :

does it really make that big of a difference

Customer :

thanks a bunch :-)

ATLPROG :

no as such

ATLPROG :

its just progamming style

Customer :

oh ok....

ATLPROG :

infact if you see

ATLPROG :

http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html

ATLPROG :

the braces are always on the same line and not a new line

ATLPROG :

as i do it

Customer :

yes i see what you are referring to on the link you provided

Customer :

and the program before that i think you did it the same way and he gave me a 95

Customer :

if you could just redo whatever he is referring to just to please him then I will go ahead and accept :-) I just want a passing grade in this stupid class LOL

ATLPROG :

i guess we are good to use what i have sent to you

ATLPROG :

as it has braces in same line

Customer :

oh ok

Customer :

cool

ATLPROG :

when you said you got 95

ATLPROG :

was it for Cat program

Customer :

perfect...I will be taking programming fundamental next semester so I will be looking for you once i get into that class.

Customer :

let me check

Customer :

that was the phone number program

ATLPROG :

ok

ATLPROG :

even in that program braces are in same line

Customer :

if I wanted to added a tip again, do i have to do it now or can I still add it tomorrow?

ATLPROG :

i am not sure..I guess it be better/safer if you could do it right away (if you want to obviously)

Customer :

ok cool...doing it now!! Thanks again and will be chatting with you again in 2 more weeks. THANKS so much for all your help this semester. It is greatly appreciated!!

ATLPROG :

sure would love to help again

Expert TypeComputer Software Engineer
Category: Programming
Pos. Feedback: 99.8 %
Accepts: 7397
Answered: 5/2/2011

Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

Ask this Expert a Question >
 
Tweet

3 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
Submit pseudocode and a flowchart for the following programming 6/10/2013
I would like to give a directory and then report on the extensions 6/9/2013
Can you help me with a programming assignment? 6/9/2013
I'm looking for someone to tutor me, for programming, and softwar 6/3/2013
hi there'i have four questions about java its all about 5/29/2013
For The Doctor ONLY - Please fix the Doe Valley town Meeting 5/18/2013
Scenario: 5/17/2013
I need help with my website, I put in the Infolink ad code 5/17/2013
I need to make the submit button bigger 5/15/2013
Need a java programming to fulfill the following requirements: 1. 5/13/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

In The News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
143 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us | Our Network
© 2003-2013 JustAnswer LLC
  • Pearl.com
  • JustAnswer UK
  • JustAnswer Germany
  • JustAnswer Spanish
  • JustAnswer Japan