Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Would you guys be able to complete this without the jar file? COMP163 Falling Rocks Project 1 of 3 This project should be done by

Would you guys be able to complete this without the jar file? image text in transcribed
image text in transcribed
image text in transcribed
COMP163 Falling Rocks Project 1 of 3 This project should be done by teams of two students. Be sure to put the names of both students in the top comments of all three Java files. You may do the program by yourself if you wish. Create the following three classes with the indicated class instance variables and methods. Each class must be in its own file. Rock Several objects of the Rock class will move down the screen xPs hrizntal position of the object yPos int vertical position of the object size size of the object in pixels color java awt Color color of the object public Rock int xLoc, int yLoc, int radius) Initialize class instance variables. Set color to whatever you like (except white). public int getyPos Retuns the vertical position of the object, yPos public void setyPos (int Set the yPos of the Rock object. y public int getxPos Returns the horizontal position of the Rock, xPos. public void drop (int howFar) Move the object's position down by howFar pixels. Add howFar to yPos. public void drawRock (java.awt Graphics screen) Draw the object at the current xPos and yPos as the upper left comer Dodger A Dodger object moves left and right at the bottom of the screen trying to avoid the Rocks. xPos in horizntal position of the object yPos int vertical position of the object size in size of the object in pixels color java.awt.Color color of the object maxX int mximum value the xPos can be public Dodger int xLoc, int yLoc, int heightwidth, int maxX 1 Initialize class instance variables. Set color to anything except white. page 1 of3

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_2

Step: 3

blur-text-image_3

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

Does economic growth overcome scarcity?

Answered: 1 week ago