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
-
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...
-
If you are driving 95km / h along a straight road and you look to the side for 2.0 s, how far do you travel during this inattentive period?
-
In 2019, Henry and his wife, Wendy, made the gifts shown below. All gifts are of present interests. What is Wendy's gift tax payable for 2019 if the couple elects gift splitting and Wendy's previous...
-
Consider the following cash flow profile and assume MARR is 10 percent/year and the finance rate is 4 percent/year. a. Determine the MIRR for this project. b. Is this project economically attractive?...
-
(Term Modification without GainDebtors Entries) On December 31, 2010, the American Bank enters into a debt restructuring agreement with Barkley Company, which is now experiencing financial trouble....
-
According to the Civil Code of the Philippines, Article 1 7 6 7 defines partnership as: By the contract of partnership two or more persons bind themselves to contribute money, property, or industry...
-
The Scampini Supplies Company recently purchased a new delivery truck. The new truck cost $22,500, and it is expected to generate net after-tax operating cash flows, including depreciation, of $6,250...
-
Refer to Table 13-2. At which number of workers does diminishing marginal product begin? Table 13-2 Number of Total Workers 02 O 3 04 0 1 Marginal Output Product 0 200 450 600 650 234
-
How do advanced econometric techniques, such as panel data analysis, time series modeling, and structural equation modeling, contribute to empirical research in economics by examining causal...
-
How does functionalism elucidate the intricate interplay between social institutions, cultural norms, and individual behaviors in shaping societal stability and adaptation to change?
-
How corporate firms are important to all managers in the U.S financial system?
-
How do advanced theories of market structure and competition, including monopolistic competition, oligopoly theory, and game theory, illuminate the behavior of firms, pricing strategies, and market...
-
Factor the GCF (greatest common factor) out of the following polynomial: 2t6 +64 + 14t Preview
-
A university consists of several departments. Each department is identified by its name and location. Students are enrolled in different departments. Every student has a student id, student name,...
-
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...
-
The perfectly competitive model assumes that firms know when marginal revenue equals marginal costs. a. If a firm doesnt have this information, can it produce at the profit-maximizing level of...
-
Hundreds of music stores have been closing in the face of stagnant demand for CDs because of new competition by online music vendors. a. How would price competition from these new sources cause a...
-
A California biotechnology firm submitted a tomato that will not rot for weeks to the U.S. Food and Drug Administration. It designed such a fruit by changing the genetic structure of the tomato. What...
Study smarter with the SolutionInn App