The original Lemmings video game is a puzzle game where a player can assign skills to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The original Lemmings video game is a puzzle game where a player can assign skills to Lemming characters in order to help them navigate through a level. Implement an Enum in Java called Lemming which enumerates the different Lemming skill types from the original Lemmings video game. Include in the enum the speed of each lemming carrying out their respective skill, as follows, Climber-5, Floater-3, Bomber-0, Blocker=0, Builder=2, Basher=4, Miner=3, Digger=1, and a boolean indicating whether or not they are destructive to their environment. Bombers, Bashers, Miners, and Diggers are destructive; the others are not. Provide a suitable toString() method to print information about the enumerated types. Write a Java program to provide a GUI for configuring and starting the game of Lemmings. Use suitable Swing components to allow the player to set the following properties and perform the following operations: 1) Start the game. 2) Choose the game resolution from a list (640 x 480; 1280 x 720; 1920 x 1080; 2560 x 1440) 3) Enter a level code (e.g., CAJJMDLJCL) 4) Game difficulty selection buttons (Fun; Tricky; Taxing; Mayhem) 5) Exit the game. Show the top-level design of the GUI, including any Panels and related Layout Manager objects that you propose to use. For each of the components you have chosen above, write the code to construct the component, add the component to a container, and then set up simple event handling for the component. The event handlers only need to print out a message to indicate that they have been called. Show using a code example how a thread may be created (and started) using an application class that implements the Runnable interface. Include a mechanism in the Runnable class to allow it to be shutdown gracefully (i.e., without needing to call the stop () method). Assume you have a bank account class that may be accessed by more than one thread of execution simultaneously. Show how the various business methods of the class may be made thread safe. Outline the design and code implementation of the Java class for an object that will be used as a buffer to hold a string object. The contents of the String may be written randomly by one or more Producer threads, provided that it has already been consumed by one of a number of Consumer threads. Each value produced must be consumed exactly once and there may be multiple producer and consumer threads executing (and attempting to access the buffer) concurrently. The original Lemmings video game is a puzzle game where a player can assign skills to Lemming characters in order to help them navigate through a level. Implement an Enum in Java called Lemming which enumerates the different Lemming skill types from the original Lemmings video game. Include in the enum the speed of each lemming carrying out their respective skill, as follows, Climber-5, Floater-3, Bomber-0, Blocker=0, Builder=2, Basher=4, Miner=3, Digger=1, and a boolean indicating whether or not they are destructive to their environment. Bombers, Bashers, Miners, and Diggers are destructive; the others are not. Provide a suitable toString() method to print information about the enumerated types. Write a Java program to provide a GUI for configuring and starting the game of Lemmings. Use suitable Swing components to allow the player to set the following properties and perform the following operations: 1) Start the game. 2) Choose the game resolution from a list (640 x 480; 1280 x 720; 1920 x 1080; 2560 x 1440) 3) Enter a level code (e.g., CAJJMDLJCL) 4) Game difficulty selection buttons (Fun; Tricky; Taxing; Mayhem) 5) Exit the game. Show the top-level design of the GUI, including any Panels and related Layout Manager objects that you propose to use. For each of the components you have chosen above, write the code to construct the component, add the component to a container, and then set up simple event handling for the component. The event handlers only need to print out a message to indicate that they have been called. Show using a code example how a thread may be created (and started) using an application class that implements the Runnable interface. Include a mechanism in the Runnable class to allow it to be shutdown gracefully (i.e., without needing to call the stop () method). Assume you have a bank account class that may be accessed by more than one thread of execution simultaneously. Show how the various business methods of the class may be made thread safe. Outline the design and code implementation of the Java class for an object that will be used as a buffer to hold a string object. The contents of the String may be written randomly by one or more Producer threads, provided that it has already been consumed by one of a number of Consumer threads. Each value produced must be consumed exactly once and there may be multiple producer and consumer threads executing (and attempting to access the buffer) concurrently.
Expert Answer:
Answer rating: 100% (QA)
ANSWER Part 1 Enum for Lemming skills Heres the implementation of the Lemming enum in Java which includes the skill types their speeds and whether or ... View the full answer
Related Book For
Project Management The Managerial Process
ISBN: 9781260570434
8th Edition
Authors: Eric W Larson, Clifford F. Gray
Posted Date:
Students also viewed these programming questions
-
For the following scenarios, determine whether or not they represent paired designs. a. Reaction times for students taken at 8:00 a.m. compared to reaction times for the same students taken at 10:00...
-
For the following scenarios, determine whether or not they represent paired samples. a. Test scores for students in a biology class taught by Professor Quick are being compared to test scores in a...
-
Twenty corporations were asked whether or not they provide retirement benefits to their employees. Fourteen of the corporations said they do provide retirement benefits to their employees, and 6 said...
-
The income statement information for 2010 and 2011 of the Connor Company (a sole proprietorship) is as follows: Required Fill in the blanks labeled (a) through (g). All the necessary information is...
-
The period T of a pendulum is measured for pendulums of several different lengths L. Based on the following data, does T appear to be a linear function of L? L(cm)|20 30 40 50 T (s) 0.9 .27 1.42
-
The most commonly used value per man-hour formula is a. Average Salary x 3 c. Average Salary x 2.5 2,500 hours 2,000 hours b. Average Salary x 2.5 d. Average Salary x 2 2,500 hours 2,000 hours
-
3. A trustees election in a Chapter 7 case requires: a Approval by a majority of creditors b Approval by a majority of claims represented c Approval by a majority in dollar amount of voting...
-
Consider the following note payable transactions of Creative Video Productions. 2012 May 1 Purchased equipment costing $17,000 by issuing a one-year, 6% note payable. Dec 31 Accrued interest on the...
-
The Bomb Pop Corporation sold ice cream equipment for $16,000. The equipment was originally purchased for $40,000, and accumulated depreciation through the date of sale totaled $25,000. Required: 1....
-
You are now going to do a simple breakeven point for number of passengers on a flight for the years 20x4 to 20x6. Go to the worksheet that says Template for DB 3.2. Complete the breakeven analysis...
-
18. Let S be the outward oriented sphere a + + 2 = 1. Let F = (12, x2, 123 ". 2') be a vector field. Use the divergence theorem to compute the flux integral f f F . N ds
-
Mail - Jame Mail - Jame x a Amazon.co x a Amazon.co. X https://gpt x _ Calendar - - C * gptc.blackboard.com/webapps/blackboard/content/contentWrapper.jsp?content_id=_1846554 GEORGIA PIEDMONT...
-
Prepare a partnership return and the appropriate K-1s for W & M Partnership. William Winston (SSN: 226-00-4265) lives at 53 Mantis Road, Your City, Your State - Your Zip. He operates Lovely Lady...
-
A new store is opening in Rock Spring, with 175,000 available square feet. Each department must have at least 17,000 square feet and no department can have more than 24% of the total retail floor...
-
Following is a partially completed balance sheet for Epsico Incorporated at December 31, 2022, together with comparative data for the year ended December 31, 2021. From the statement of cash flows...
-
Stockholders of Sarasota Company, Riverbed Company, and Pronghorn Company are considering alternative arrangements for a business combination. Balance sheets and the fair values of each company's...
-
Hextall Manufacturing had always made its raised endcaps in-house. However, Fuhr Metal Fabricating had recently offered to supply one raised endcap, TM-27, at a price of $29.00 each. Hextall uses...
-
Frontland Advertising creates, plans, and handles advertising campaigns in a three-state area. Recently, Frontland had to replace an inexperienced office worker in charge of bookkeeping because of...
-
Do you agree with Ron Parkers statement To be successful, you must also be willing to run at problems/opportunities when everyone else is running away from them?
-
Assume you are to command a similar mission. What are two things you would insist on, based on what you learned about Eagle Claw?
-
Given the following network, compute the early, late, and slack time for each activity. Clearly identify the critical path A Design 3 Lag 2 Legend ID ES EF SL Description SL LS Duration LF D Build...
-
Management Fees Supplied By One Of The Joint Operators LO4 On 1 July 2019, Broome Ltd and Kalbarri Ltd agreed to a joint operation that would be involved in the production of furniture. The...
-
Contributions of cash LO3, 4 Gold Ltds main area of interest is the production of glass products. Star Ltd manufactures products that require the employment of artists with skills in fine etchings....
-
Share of output LO3, 4 Alice Ltd is a mining company operating in Victoria. Its main areas of mining are openpit gold mines and iron ore mines. In 2019 while exploring for ore the company...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App