Can someone help me with this and fix this three and NOT make it one pieace of
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Revise the code to incorporate common design patterns to make your code more efficient. Given the starter code, complete the Game Service, Program Driver, and SingletonTester classes. Begin by uploading CS 230 Project One Game App.zip as a new project in Eclipse. A tutorial is available for uploading files to Eclipse: Uploading Files to Eclipse Desktop Version Tutorial PDF. Please note: You will not complete the Player and Team classes at this time. To view the tasks you have been assigned, navigate in your Eclipse project to the Window, Show View, and Tasks view. You can double-click on any of the tasks (as seen in the image) to be directed to the line of code that needs to be completed where the tasks are located. A text version of this image is available: FIXME Text Version Word Document. Review the code for the Game Service class provided for you. Notice the static variables holding the next identifier to be assigned for game ld. • Use the singleton pattern to adapt an ordinary class definition, so that only one instance of the GameService class exists in memory at any time. • Explain the purpose and characteristics of the singleton pattern you are using in the context of this application. Include this brief explanation as comments in your code. The comments will be used to communicate your understanding of the pattern you implemented to your instructor. This multi-user game application must have the ability to have multiple instances of the game running at once, each having players and teams. Often, individual instances of the game will prompt users to save the new game being played. To ensure there are no duplicate instances of the game at the point of saving, the application must check to ensure that the name chosen by the user is not already in use. To meet this requirement, you will want to use an iterator pattern in the application. This will ensure that when a user starts a new game to play, the application checks every instance of the game already in play to determine if the new name chosen by the user is in use. Currently, most frameworks have iterator capabilities built in; it is rare to need to build an iterator from scratch. Therefore, we'll practice using one provided in Java. • In the Game Service class, use the iterator pattern to complete the coding for the addGame() and both getGame() methods. Note: The getGame(name) method is needed to allow a game instance to be retrieved using only the unique name. • Explain the purpose and characteristics of the iterator pattern you are using in the context of this application. Include this brief explanation as comments in your code. The comments will be used to communicate your understanding of the pattern you implemented to your instructor. • Demonstrate industry standard best practices to enhance the readability of your code, including appropriate naming conventions and in-line comments that describe the functionality. • Run and compile the code to ensure the application is functional and the requirements have been met. Revise the code to incorporate common design patterns to make your code more efficient. Given the starter code, complete the Game Service, Program Driver, and SingletonTester classes. Begin by uploading CS 230 Project One Game App.zip as a new project in Eclipse. A tutorial is available for uploading files to Eclipse: Uploading Files to Eclipse Desktop Version Tutorial PDF. Please note: You will not complete the Player and Team classes at this time. To view the tasks you have been assigned, navigate in your Eclipse project to the Window, Show View, and Tasks view. You can double-click on any of the tasks (as seen in the image) to be directed to the line of code that needs to be completed where the tasks are located. A text version of this image is available: FIXME Text Version Word Document. Review the code for the Game Service class provided for you. Notice the static variables holding the next identifier to be assigned for game ld. • Use the singleton pattern to adapt an ordinary class definition, so that only one instance of the GameService class exists in memory at any time. • Explain the purpose and characteristics of the singleton pattern you are using in the context of this application. Include this brief explanation as comments in your code. The comments will be used to communicate your understanding of the pattern you implemented to your instructor. This multi-user game application must have the ability to have multiple instances of the game running at once, each having players and teams. Often, individual instances of the game will prompt users to save the new game being played. To ensure there are no duplicate instances of the game at the point of saving, the application must check to ensure that the name chosen by the user is not already in use. To meet this requirement, you will want to use an iterator pattern in the application. This will ensure that when a user starts a new game to play, the application checks every instance of the game already in play to determine if the new name chosen by the user is in use. Currently, most frameworks have iterator capabilities built in; it is rare to need to build an iterator from scratch. Therefore, we'll practice using one provided in Java. • In the Game Service class, use the iterator pattern to complete the coding for the addGame() and both getGame() methods. Note: The getGame(name) method is needed to allow a game instance to be retrieved using only the unique name. • Explain the purpose and characteristics of the iterator pattern you are using in the context of this application. Include this brief explanation as comments in your code. The comments will be used to communicate your understanding of the pattern you implemented to your instructor. • Demonstrate industry standard best practices to enhance the readability of your code, including appropriate naming conventions and in-line comments that describe the functionality. • Run and compile the code to ensure the application is functional and the requirements have been met.
Expert Answer:
Related Book For
Business Communication Essentials a skill based approach
ISBN: 978-0132971324
6th edition
Authors: Courtland L. Bovee, John V. Thill
Posted Date:
Students also viewed these programming questions
-
Question 40 (1 point) Mark Kevin Motor of Panguil Bay, Philippines makes marine motors for vessels. The company uses a job-order costing system. Only three jobs - Job MK508, Job MK509 and Job MK510 -...
-
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...
-
THIRD AVENUE SOFTWARE HEALTH-CARE APP PROJECT This case is new for the ninth edition of Information Technology Project Management . The case provides an opportunity to apply agile and Scrum...
-
Based on the illustration of an iPhone shown below, draw a system model for an iPhone. iPhone Components Flash memory. CPU Main circuit boards Communications GSM cell, WiFi, EDGE Battery Display...
-
Being a sophisticated trader, you are not afraid to engage in selling shares short. You sell short 100 shares of Internet Bust Company, at the market price of $20.00 per share. What is your profit or...
-
For the n-stringers section in the following figure, under loading conditions Vz = 7500 N and Mz 50 kNm (positif). a. Calculate the stress distribution, i.e., normal stress at the boom and shear...
-
The comparative financial statements for CyberOptic Corporation are in the Working Papers. The financial statements have been completed up to the comparative analysis section. Instructions: 1....
-
At December 31, 2013, Stacy McGill Corporation reported current assets of $370,000 and current liabilities of $200,000. The following items may have been recorded incorrectly. 1. Goods purchased...
-
2. Consider a medium in which the heat conduction equation is given in its simplest form as 1 a or r ar (2)+()+ k + egen = 0 (a) Is heat transfer steady or transient? (b) Is heat transfer one-, two-,...
-
An Engagement supervisor has asked the audit senior to perform the following procedures related to an engagement. For each procedure listed, identify the financial statement assertion being tested by...
-
Read the Case - Goodridgev. Dept of Public Health Should the government recognize same-gender marriages? Compare and contrast several approaches. Which do you find persuasive and why? U se the case...
-
How can the following expression be written so that no negative exponents appear? c2 - 2
-
Kitchen Korner produces refrigerators, dishwashers, and stoves at three different factories. The table gives the number of each product produced at each factory per day. Kitchen Korner receives an...
-
Perform the following operations on the complex numbers. 13. (12i-7)+(11-8i)-(6-i) 14. (9-5i)(3-4i) 4i 15. 91-5
-
Attorneys Piazza and Gonzalez are holding a round-table meetings with their respective paralegal teams. The topic of the discussion is "Discovery", and why it is so important. The various forms of...
-
Evaluate. -2-13-23 (-1)
-
Two point charges are located on the y axis as follows: charge 91 = -2.20 nC at y = -0.500 m, and charge q2 = 2.30 nC at the origin (y = 0). For related problem-solving tips and strategies, you may...
-
How many years will it take a $700 balance to grow into $900 in an account earning 5%?
-
Spreading FUD-fear, uncertainty, and doubt-about other companies is one of the less-honorable ways of dealing with competition in the business world. For example, someone can start a "whisper...
-
As chief administrator for the underwriting department of Aetna Health Plans in Walnut Creek, California, you're facing a difficult task. One of your best underwriters, Hector Almeida, recently lost...
-
If you lack one important qualification for a job but have made it past the initial screening stage, how should you prepare to handle this issue during the next round of interviews? Explain your...
-
Why is an increase in accumulated depreciation on the balance sheet ignored when analyzing the cash flows from investing activities?
-
What does an increase in the balance of accounts payable indicate?
-
The consistency principle stipulates that when a company begins using a given inventory valuation method (FIFO, LIFO, or the weighted-average cost method), the company should continue to use that...
Study smarter with the SolutionInn App