• 100% Satisfaction Guarantee

ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 8297
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
ATLPROG is online now

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

### Customer Question

FOR ATL PROG

PART I

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.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: 2 years ago.
Category: Programming
Expert:  ATLPROG replied 2 years ago.

ATLPROG :

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 :

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:

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 :

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, Computer Software Engineer
Category: Programming
Satisfied Customers: 8297
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland

• ### ATLPROG

#### Satisfied Customers:

7463
MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >

### ATLPROG

#### Satisfied Customers:

7463

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

### LogicPro

#### Satisfied Customers:

5603

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

#### Satisfied Customers:

1158

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

### lifesaver

#### Satisfied Customers:

950

Several years of intensive programming and application development experience in various platforms.

### ehabtutor

#### Satisfied Customers:

864

Bachelor of computer science, 5+ years experience in software development, software company owner

### Raj

#### Satisfied Customers:

860

BE CS, 4+ Experience in Programming and Database (ERP)