Question: 1.You will need the code from Paper.java and Scissors.java to complete this lab. 2.Open the Paper.java and Scissors.java files. 3.Create a new file called Driver.java

1.You will need the code from Paper.java and Scissors.java to complete this lab.

2.Open the Paper.java and Scissors.java files.

3.Create a new file called Driver.java (make it as the Start File) - this file will use the Paper and Scissors classes (note that neither the Paper or Scissors classes have a main method).

4.Write the appropriate java code that will allow for object creation via a main method that simply declares an instance of Paper and an instance of Scissors. (Hint: The instance for Paper is created as Paper p; Create the instance of Scissors similarly).

5.Put the following additional functionality in the main method (note - you will need the Scanner class to handle user input):

6.declare 3 integers called 'length', 'sharpness', and 'cut'

7.prompt the user for a length, read the value they enter in, and instantiate the Paper class using the constructor. (Hint: the Paper object is created as p = new Paper(length); )

8.prompt the user for a sharpness, read the value they enter in, and instantiate the Scissor class using the constructor. (Hint: Create the Scissors object on similar lines to the Paper object)

9.prompt the user for the length of a cut, read the value they enter in, and use the Scissor to make a cut that long in the Paper using the appropriate method in the Scissor class

10.print the information associated with the Paper using the appropriate method in the Paper class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!