Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA problem Write a program using the DrawingPanel that contains a method for d

ID: 3859548 • Letter: J

Question

JAVA problem

Write a program using the DrawingPanel that contains a method for drawing a checkerboard.

The checkerboard should be 160 units wide (and tall) and should have an input parameters that allow the method to place the checkerboard at any x and y coordinates. For example you should be able to do the following in your main program.

drawCheckerboard(100,100, myG);

drawCheckerboard(120,500, myG);

To draw two different checkerboards.

You may choose your own colors for the squares on the checkerboard.

CS145 PROGRAMMING ASSIGNMENT 18 RESORT HOTEL OVERVIEW This assignment will give you practice with object, arrays and strings You are going to write a program that will maintain an active use of a number of different rooms at a resort, where each room is part of a particular building To begin with, you will be writing the methods for two of the classes that will allow the program to work. This first part is the primary goal of the assignment and account for80% of the grade. The second part of the assignment has you "fixing" the program to sert an object that should have been there all along BACKGROUND A modern resort tends to not have a single building with rentable rooms, but rather a series of building, each with its own set of rooms. We want to be able to write a program to maintain an active directory of which rooms are occupied currently, which are empty, be able to rent out a room, and be able to state when the occupants have checked out of a room For the purposes of this assignment, we are going to assume that each building is given a character name and a number of rooms, and a price per room. Each room of that building will be assumed to be the same price. So for example Building 'A' might have 5 rooms each at a price of $150.00 a night. While building 'D' might have 10 rooms at a price of $75.00 a night. We will want to keep track of the data using the ResortManagement.java file as the primary client and building the companion files Building. java and Room. java The main program will then run a loop to allow us to check in (rent a room check out (be done with a room and getting data from the files PART 1 For the first part of this assignment, you will be creating two classes that work with ResortManagement.java file to implement the necessary files. You are not to adjust/alter ResortManagement.java in any way. You will need to implement the two classes Building.java and Room.Java. Their UMLs are below and a text description follows.

Explanation / Answer

The function that should be used for making the checkerboard is give below.
This function can be called repeatedly for making number of checkerboards

for (int i = 1; i < 9; i++)
{
for (int j = 1; j < 9; j++)
   {
if ( i+j % 2 == 0 )
       {
color = white;
}
       else
       {
color = black;
}
}
}