Answered step by step
Verified Expert Solution
Link Copied!

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

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 an array of room objects called rooms (For this program, set the size of the array to exactly 3). 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 20 and 50(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.
image text in transcribed

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

Students also viewed these Databases questions