Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started