Question: 3 - Create a class file called Driver.java that implements the Driver class which should implement the following two methods: main method which should create
Create a class file called Driver.java that implements the Driver class which should implement the following two methods:
main method which should create an array of room objects called rooms For this program, set the size of the array to exactly To initialize the property values for each room in array rooms, you should do the following:
x
a Create an array of chairs with a random number of chairs between and inclusive and add that number of Chair objects to the array. Each Chair object added to the array should be given the same default value for properties weight and dateManufactured. As for property distanceFromFrontWall, each chair should be given a random value that does not exceed the length of the room. For the property color, you should assign a random color out of the following three colors only red yellow, or white Use the Random class to do those.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
