Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part I: Finish the questions of section 7.1,8.2, 8.3 of MPL Note: There are about 28 questions in total. You could have THREE attempts. The

image text in transcribed
Part I: Finish the questions of section 7.1,8.2, 8.3 of MPL Note: There are about 28 questions in total. You could have THREE attempts. The highest attempt will be considered as the final grade of this part. Part II: Writ Java programs. You have learned how to make animation using DrawingPanel.java to let the car move on the window. But how about draw another shape and control the movement of it using the keyboard? For example, we can draw a building as shown on the right side and then move it up, down, left and right by typing 'i', 'k',j'and I' separately. Please solve this problem by following the steps below: 1) Write a java program named "BuildingSystem.java", in which there is a static method called draw used to draw a simple frame of the building. Drawing panel is size 500 500 . Building is at (50,10), size 45 100 File View Help Gray background Windows are in color (red = 100, green = 50, blue 100) Each window is size 5 5 Windows are 10px apart (5 blank pixels between horizontally and vertically) . The leftmost window is 10px away from the leftmost border of the building. The draw method accepts three parameters: graphics, the x and y coordinate of the top left corner of the building

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions