Question: In java program thank you;) Assignment 4: 1. Design and implement a class called Box that contains instance data that represents the height, width, and
Assignment 4: 1. Design and implement a class called Box that contains instance data that represents the height, width, and depth of the box. Also include a boolean variable called full as instance data that represents whether the box is full or not Define the Box constructor to accept and initialize the height, width, and depth of the box. Each newly created Box is empty (the constructor should initialize ful to false). Include getter and setter methods for all instance data. Include a toString method that returns a oneline description of the box. Create a driver class called BoxTest, whose main method instantiates and updates several Box objects 2. Write an application that prompts for and reads the user's first and last name (separately). Then print a string composed of the first letter of the user's first name, followed by the first five characters of the user's last name, followed by a random number in the range 10 to 99. Assume that the last name is at least five letters long. Similar algorithms are sometimes used to generate usernames for new computer accounts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
