Java project

Closed

The following are the directions for what I need done:

Comments are REQUIRED; flow charts and Pseudocode are NOT REQUIRED.

Directions

Points

The files must be called <LastNameFirstNameProg7.java>. (driver)

[url removed, login to view] (handles the fractional numbers)

Example: [url removed, login to view]

[url removed, login to view]

Ensure you include ALL files required to make your program compile and run.

I would like to see your .java files only.

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter.

4

Basic Requirements

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

[url removed, login to view]

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([url removed, login to view]);

Fraction c, d, x; // Fraction objects

[url removed, login to view]("Enter numerator; then denominator.");

c = new Fraction([url removed, login to view](), [url removed, login to view]());

[url removed, login to view]();

[url removed, login to view]("Enter numerator; then denominator.");

d = new Fraction([url removed, login to view](), [url removed, login to view]());

[url removed, login to view]();

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

[url removed, login to view]("Sum:");

[url removed, login to view](c).add(d);

[url removed, login to view]();

[url removed, login to view]();

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

[url removed, login to view]("Product:");

[url removed, login to view](c).multiply(d);

[url removed, login to view]();

[url removed, login to view]();

[url removed, login to view]("Enter numerator; then denominator.");

x = new Fraction([url removed, login to view](), [url removed, login to view]());

[url removed, login to view]();

} // end main

Note that this demonstration driver does not call the accessor methods. That’s OK. Accessor methods are often implemented regardless of whether there’s an immediate need for them. That’s because they are very useful methods in general and providing them means that future code can use them when the need arises.

16

[url removed, login to view]

Write a Fraction class called [url removed, login to view] 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 ([url removed, login to view], 1.5, etc.)

Separate accessor methods for each instance variable in the Fraction class.

Here is a sample output:

Enter numerator; then denominator.

5

8

5/8

Enter numerator; then denominator.

4

10

4/10

Sum:

82/80

[url removed, login to view]

Product:

20/80

[url removed, login to view]

Enter numerator; then denominator.

6

0

infinity

Skills: Java

See more: write class called fraction java, fraction class java, write driver fraction class performs addition, fraction driver java, lastnamefirstnameprog7 fraction driver, example fraction class java, java program fraction driver, lastnamefirstnameprog7, lastnamefirstnameprog7 java, java fraction class add multiply print double, what is new in java 1.5, print println java, new in java 1.5, make charts, java 1.5 for each, flow x, first class objects in java, first capital, code java project, can capital, 16 handles, write driver fraction class, separate fractional java example, fraction java program, java fraction class

Project ID: #672300

Awarded to:

ihsoftAFaisal

*************CODING DONE************* Waiting for ur arrival. Well Documented and tested with ur sample set. Lets talk on PM. Thanks.

$30 USD in 0 days
(8 Reviews)
5.8

22 freelancers are bidding on average $35 for this job

fahien

very simple job. please check pm.

$30 USD in 0 days
(13 Reviews)
4.1
rakib062

hello sir, I have been coding in java for over 6 years. Yours is a very basic coding project and can be done in a few hours. If you need any user interface I can also provide it. waiting for your reply. thanks

$40 USD in 0 days
(10 Reviews)
3.8
jfivekiller

Hello Easy project can complete easily please feel free to ask me any questions Thanks John Fivekiller

$30 USD in 1 day
(1 Review)
1.3
Aplussolution

I am interested please see the PM

$30 USD in 0 days
(1 Review)
1.0
VitaminPo

Please check your inbox for PM.

$30 USD in 0 days
(0 Reviews)
0.0
riteshkesari

i am scjp and scwcd

$30 USD in 5 days
(0 Reviews)
0.0
ahmedshayan

I can this job easily.

$40 USD in 3 days
(0 Reviews)
0.0
adevelopers

Hello. I have vast experience in Java. Please view PM.

$30 USD in 1 day
(0 Reviews)
0.0
jposeidon

This is a simple program, I have already created and tested. Please check your PM. Thanks

$30 USD in 0 days
(0 Reviews)
0.0
shobana8184

Hi. I have already done it.

$30 USD in 0 days
(0 Reviews)
0.0
ashwinis85

Hi..just give me a few hours for this...will be done..see PM for details

$30 USD in 1 day
(0 Reviews)
0.0
iamsupriyo

This job could be done in 1 day.

$30 USD in 1 day
(0 Reviews)
1.0
rich009

giv me i wil do that

$50 USD in 2 days
(0 Reviews)
0.0
hussainsharif

Please chk ur PMB

$60 USD in 2 days
(0 Reviews)
0.0
mrbig81

I'm ready to do this program.Plz check your PMB.

$40 USD in 1 day
(0 Reviews)
0.0
oslil123

I understand your problem completely. I think I will do this job efficiently.

$50 USD in 7 days
(0 Reviews)
0.0
JavaTopOne

Hello, this is a simple task please check your inbox Thanks

$35 USD in 0 days
(0 Reviews)
0.0
tenruan

Look forward to serve you.

$30 USD in 1 day
(0 Reviews)
0.0
abu2008

We have a technical team of one of india’s most reputed engineering college. We have a consistent record in delivering the product with maximum accuracy. We are looking forward to hearing from you We have 5+ y More

$35 USD in 2 days
(0 Reviews)
0.0
talalanwar

check PM for details

$30 USD in 1 day
(0 Reviews)
0.0