i need help in a code for my assignment JAVA SWING GRAPHICS AND ANIMATION: Dodgeball You are
Fantastic news! We've Found the answer you've been seeking!
Question:
i need help in a code for my assignment
Transcribed Image Text:
JAVA SWING GRAPHICS AND ANIMATION: Dodgeball You are in the biggest game of your life. Unfortunately, you are also the last person standing on your team. Time is running out and you only have 20 seconds left to survive before you win the game. Can you dodge, duck, dip, and dive your way to victory? Or will you be hit and lose the game? For this task, you will make a fully operational survival game called Dodgeball. The objective is to have you the player, survive a 20 second clock by avoiding incoming dodgeballs that are being thrown at you. The game will incorporate all techniques taught throughout UNIT 4: Object Oriented Programming. DODGE BALL All images and their correct sizes have been provided to you and can be found on the class website in a zipped file called images. You can choose to use more classes if you wish, however your program must contain a minimum of three (3) classes: Player, Enemy, and the main class (Dodgeball). Use the UML's below to help you setup the Player and Enemy class: ✗Pos, y Pos: int Player · img Player: ImageIcon - dir: int - UP = 0, DOWN = 1: final int Player ( ) + sety(y: int): void + getX(): int + getY(): int + move () : int + setDirection(y: int): void + getImage(): ImageIcon + setImage (choice: int): void Remember that in the move () method, you need to check which direction you are moving in, change the y-position coordinate, and then return the y-position. In the set Image () you are checking to see which player colour the user wants to use. You will then set the ImageIcon to the appropriate image. Dodgeball Page 1 of 8 JAVA SWING GRAPHICS AND ANIMATION: Dodgeball You are in the biggest game of your life. Unfortunately, you are also the last person standing on your team. Time is running out and you only have 20 seconds left to survive before you win the game. Can you dodge, duck, dip, and dive your way to victory? Or will you be hit and lose the game? For this task, you will make a fully operational survival game called Dodgeball. The objective is to have you the player, survive a 20 second clock by avoiding incoming dodgeballs that are being thrown at you. The game will incorporate all techniques taught throughout UNIT 4: Object Oriented Programming. DODGE BALL All images and their correct sizes have been provided to you and can be found on the class website in a zipped file called images. You can choose to use more classes if you wish, however your program must contain a minimum of three (3) classes: Player, Enemy, and the main class (Dodgeball). Use the UML's below to help you setup the Player and Enemy class: ✗Pos, y Pos: int Player · img Player: ImageIcon - dir: int - UP = 0, DOWN = 1: final int Player ( ) + sety(y: int): void + getX(): int + getY(): int + move () : int + setDirection(y: int): void + getImage(): ImageIcon + setImage (choice: int): void Remember that in the move () method, you need to check which direction you are moving in, change the y-position coordinate, and then return the y-position. In the set Image () you are checking to see which player colour the user wants to use. You will then set the ImageIcon to the appropriate image. Dodgeball Page 1 of 8
Expert Answer:
Answer rating: 100% (QA)
To create the Dodgeball game you need to implement the Player and Enemy classes along with the main Dodgeball class Heres a brief outline of each class 1 Player Class Attributes xPos yPos int imgPlaye... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Evan participates in an HSA carrying family coverage for himself, his spouse, and two children. In 2018, Evan has $100 per month deducted from his paycheck and contributed to the HSA. In addition,...
-
Verhage Limited, a private company that complies with accounting standards for private enterprises (ASPE), has redeemable preferred shares outstanding that carry a dividend of 5%. If the shares are...
-
Shown in Figure are three finite-length sequences of length 5. X i (e j? ) denotes the DTFT of x i [n], and X i [k] denotes the five-point DFT of x i [n]. For each of the following properties,...
-
Which of the following is not a combustible gas? (a) Oxygen (b) Hydrogen (c) Butane (d) Methane
-
Dow AgroSciences, LLC (DAS), makes and sells agricultural seed products, in 2000, Timothy Glenn, a DAS sales manager, signed a covenant not to compete. He agreed that for two years from the date of...
-
The big hope housing company uses a predetermined overhead rate to allocate overhead based on Direct Labor cost. This years budget includes Overhead equal to $500,000 and Direct Labor cost of...
-
Answer these questions, based on the debit memorandum shown here. 1. Which company is returning the merchandise? 2. How many items are being returned? 3. What amount is entered in the journal entry?...
-
Step 1: Study the diagrams of an incandescent light bulb and its parts. Answer the question. Glass Bulb Support Wires Filament -Lead Glass Support - keeps support wires Screw Base Screw Base...
-
It is known that the proportion of female costumers in Westpac is 40%. The General Manager is interested in some probabilities. Determine What is the probability that in a randomly selected sample in...
-
Provide your definition of coaching. Explain how lifestyle, wellness, or executive coaching differs from traditional coaching. How might you benefit from aligning yourself with a lifestyle or...
-
What three things should occur before each coaching session? Question 9 What are the two basic techniques commonly used in coaching sessions? Question 10 Why is it necessary to check the learner's...
-
Effective and Ineffective Coaching Experiences Describe/ provides a thorough and detailed description of one effective and one ineffective experience of being coached by others. Actions for...
-
Question B3 [2 points]. Examine, analytically and graphically in a diagramme drawn in the PD-z space, the effects of the increase in i*, and show that in the new equilibrium domestic prices can be...
-
Dyno Corporation has two projects that it would like to undertake. However, due to capital restraints, the two projectsAlpha and Betamust be treated as mutually exclusive. Both projects are equally...
-
In what ways does a well-designed enterprise search software vary from popular search engines (e.g., Bing, DuckDuckGo, and Google)?
-
Carl and Jenny adopt a Russian orphan. The adoption takes 2 years and two trips to Russia and is final in 2012. They pay $6,000 in 2011 and $7,500 in 2012 of qualified adoption expenses, and have AGI...
-
Mark owns his home and has a $250,000 mortgage related to his purchase of the residence. When his daughter went to college in the fall of 2012, he borrowed $20,000 through a home equity loan on his...
-
Professor Patricia (Patty) Pate is retired from the PalmSprings Culinary Arts Academy (PSCAA). She is a single taxpayer and is 68 years old. Patty lives at 98 Colander Street, Henderson, NV 89052....
-
Determine the most appropriate strategy that can generate liquidity and accomplish Omos goals. Justify your response. Jing asks Omo about his plans for the shares of his previous employers company....
-
Discuss four important risk and tax-related considerations that are relevant to Omos portfolio. With most of Omos personal net worth tied up in his software company, he is asset rich but cash poor....
-
Discuss two estate planning objectives revealed in Hinkles discussion with Enlow. Enlow wants to transfer some of his wealth to his niece and nephew but isnt sure whether he should use lifetime gifts...
Study smarter with the SolutionInn App