Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

Students also viewed these Databases questions