Question: You will be writing two java files for this assignment. ( a ) Write a class called Box that will contain the width, length, and

You will be writing two java files for this assignment.
(a) Write a class called Box that will contain the width, length, and height of a box.
It should have a field for each of these three measurements.
It should have a constructor that takes exactly three arguments, one for each field.
It should have have class methods for accessing and changing the value of these three fields.
It should also have a class methods called volume() and surfaceArea() that take no arguments
but return the volume and surface area of the box.
You class many have additional fields and methods, but the ones listed above are required.
(b) Then you must create a program will will ask the user for the width, length and height of a box.
Your main program should create a instance of the Box class and use the class methods to
compute the volume and surface area, which are displayed to the user.
Your grade will be based on good programming technique (comments, variable names, assumptions,
etc.), correct outputs (correct mathematical computations), and correct program output (good user
interface/explanations.)
As part of your upload include your main and class java files (That's two java files!!!) and a
picture of the programming being run on your machine (a screen capture (like the example given) is
fine.)
You will be writing two java files for this

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 Accounting Questions!