Question: Q5) THE WOOD CLASS 4.4 Write a program Wood.java. A box is to be constructed out of wood with a double thickness of wood on

Q5) THE WOOD CLASS 4.4 Write a program Wood.java. A box is to be constructed out of wood with a double thickness of wood on the square bottom. Use the Box and Rectangle classes to determine the volume of the box and the surface area of the wood needed to construct the box. 2.5 2.5 Optional class: Write a utility class Name and a driver class to test each constructor and method in the Name class Each Name object should have three instance variables: String first, middle, last; Include two constructors: o public Name(String f, String m, String It) that initializes the three instance variables o public Name(String wholeName) that is split to initialize the three instance variables Include the methods: (For the examples that follow assume the name is John Ty Smith.,) o public String intials) returns a String containing the three initials of the name. T. S." is returned. For our example: "] o public String toString() returns a String containing the first name, middle initial and last name. For o public String toFullString() returns a String containing the first, middle and last names. For our o public String toLastString() returns a String containing the last name, a comma, and the first name o public String toUpperCase) returns a String containing the full name in upper case letters. For our our example: "John T. Smith" is returned. example: "John Ty Smith" is returned For our example: "Smith, John" is returned. example: "JOHN TY SMITH" is returned
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
