Question
CSCI 145 -- Project 4 (Advance Game of Roulette) Due Thursday, 12/07/2017 No Late Projects Accepted Problem Statement A company intends to offer various versions
CSCI 145 -- Project 4 (Advance Game of Roulette) Due Thursday, 12/07/2017 No Late Projects Accepted Problem Statement A company intends to offer various versions of roulette game and it wants you to develop a customized object-oriented software solution. This company plans to offer one version 100A now (similar to the simple version in project 2 so refer to it for basic requirements, but it allows multiple players per game (up to 5) and multiple games (up to 5) and there are now 38 positions on the wheel: 00, 0, 1 to 36, and the payoff for a number bet is 35 to 1) and it is planning to add several more versions in the future with more betting options. Each game has a minimum and maximum bet and it shall be able to keep track of its id, chips, money, active players, and transactions. Available chips for each game shall consist of $1, $5, $25, and $100. Each transaction shall consist of a transaction number, player number (seat number), and relevant betting information. A player can be a regular player, a VIP player, or a super VIP player. Each player keeps track of his/her own money and chips. Both types of VIP players have a 4-digit id and name as well. The system keeps track of all bets and awards 5% cash back credit rounding up to a whole dollar of all the bets to a VIP player after he or she leaves the game. In addition to getting back 5% cash back credit like a VIP player, a super VIP player gets a bonus amount based on the number of bets after he or she leaves the game ($20 for at least 10 bets and up to 20 bets, $50 for more than 20 bets). A player can determine his/her winning amount when he or she leaves the game (include cash back credit if applicable). The system will load all games with data from an input data file upon startup. It is recommended to use a Java Queue to keep track a list of all available players so you can add a new player to the rear and remove a player at the front. The user (game operator) will be able to conduct one selected game at a time. The main menu should contain the following options: Main Menu 1. Select a game 2. Add a new player to the list 3. Quit If option 1 is chosen, the user will be prompted to select a game from a list of available games and a game menu is available as shown below. When option 2 is selected, obtain necessary data and add a new player to the list of available players. When option 3 from the main menu is selected, print complete information for each game to a new text file before the program is terminated. Game Menu 1. Add a player to the game 2. Play one round 3. Return to the main menu For option 1, you need to add the next player from a list of available players to the game. When option 2 is selected, play one round similar to project 2 and you need to exchange cash for chips for a player (if applicable), remove a player from a game as well as providing winning or losing information about the player that no longer wants to play. If option 3 is selected, return to the main menu. See below for a sample input/output. Initialize games. Please wait ... All games are ready. Available games: 100A1, 100A2 Main Menu 1. Select a game 2. Add a new player to the list 3. Quit Option --> 1 Select a game --> 100A1 Game Menu 1. Add a player to the game 2. Play one round 3. Return to main menu Option --> 1 Adding player 1 to the game. Option --> 2 Make your bet ... . . . Player 1 left the game with winning amount of $10. . . . Main Menu 1. Select a game 2. Add a player to the list 3. Quit Option --> 2 Generating report ... Shutting down all games. Sample report for one session (only one player with one round): Game: 100A1 Initial Balance: $9500 Cash: $0 $100 chips: 50 $25 chips: 100 $5 chips: 200 $1 chips: 1000 Player 1 exchanges $100 for 2 $25-chip, 5 $5-chip, 25 $1-chip Round 1 (Red 13) Trans Player BAmount ($100 $25 $5 $1) BType Pay ($100 $25 $5 $1) 1 1 10 ( 0 0 2 0) R 20 ( 0 0 4 0) Ending Balance: $9490 Cash: $100 $100 chips: 50 $25 chips: 98 $5 chips: 193 $1 chips: 975 Losing amount for this session: $10 Game: 100A2 ... There will be a data file, games.txt, contains information about the version, number of games, minimum bet, maximum bet, and available chips ($100, $25, $5, and $1). There will be another data file, players.txt, contains a list of available players: regular players (0), VIP players (1), and super VIP players (2). We will also make these assumptions as well: Multiple games can be played and a game operator can switch back and forth between games. Up to 5 players per game (seats 1 to 5). A player can only play one game at a time. Each buy-in (exchange cash for chips) is a multiple of $100. For each $100 buy-in, a player would get 2 $25 chips, 5 $5 chips, and 5 $1 chips. A winning bet will be paid with largest denomination first (e.g., a winning bet of $35 would get 1 $25 chip and 2 $5 chips). A player starts with cash when entering a new game and can leave a game with chips and cash. A player can place multiple bets per round (up to 3). Each game starts with 0 in cash for the casino Assume there are sufficient chips for each game unless doing extra credit. Players will get on the list to play and they will not get off the list, but they may not be available when being called to the game. The input data files contain valid data. Analysis and Design Make sure you understand all the requirements. Ask for clarifications and missing information before you move on to the design phase. You should refer back to project 2 for some requirements about the basic roulette game. Plan the user interface: menus (see above) and interaction for each player (see project 2), Come up with a design by drawing a class diagram showing use-a, has-a, and is-a relationships as applicable. Include as much attributes and behaviors as you can for each class. You should use pseudocode to document some complex behaviors. You should take advantage of aggregation and inheritance for this project. An array or ArrayList should be used for multiple players and multiple games. Implementation Code your classes and write a roulette application by utilizing those classes. The program first loads data from games.txt, and players.txt. It then allows a game operator conducts each game and players to play the games. Print helpful messages to the screen so that we know what is going on. Make sure to utilize aggregation, inheritance, and polymorphism so that you will not need to do unnecessary work. Points will be deducted if you do not utilizing at least some useful OOP features. You might not be able to implement all features, but here is the order of important features: 1. Keep track of chips 2. Allow VIP players and super VIP players 3. Generate a summary report without transactions (ignore transactions) 4. Allow multiple bets per round for each player (can start with one bet) 5. Support multiple games (can start with one game) 6. Keep track of transactions and include transactions in report 7. Add a new player to the list of available players and determine if player is not be present when being called to the game Presentation: Each team (including a 1-person team) must do a short presentation about your project (about 5 to 10 minutes) or points will be deducted. It includes current status (features completed), UML class diagram and discussion of your design, demonstration of your software (planned test cases), and answering questions. Team project: It is not required but it is highly recommended that you work in a team of three people because it will be too much work for one person. You must sign up by Thursday, 11/16/17 if it is going to be a team project. Make sure to split the responsibilities equally and work together. You do need to provide a short description on who did what and your experience as a team project (including how you collaborate and manage changes to source code). Extra credit: You can earn up to 6 additional points for the following: Good design and fully utilizing OOP approach Your program is robust (handle exceptions) and easy to use Good presentation and good demonstration of all applicable test cases Good test plan and automated test cases (use redirection) Additional features: o Model 100B -- similar to a real roulette game with many more betting options; use gamesMulModels.txt o Display the results of the last 5 round for that game if applicable o Refill chips for each game o Stop and resume (exit program and continue where it was left off) Bonus points: Some bonus points will be given for the top three teams (6, 4, and 2 points). Please provide documentation and applying good coding style because it is part of the grade. Use the provided template as the starting point. You must come up with a sufficient number of test cases since the test cases are also part of the grade. Only one submission per team is needed and please submit the following items in a folder if flash drive is included (can also submit source code as a .zip file and PDF file of everything via Canvas): 1. Title page with name, class, project number, and relevant information about your program (compiler and system used, file names). 2. Status/team information. 3. Features implemented and design documentation. 4. A printout of the source code. 5. Printouts of any input/output. 6. A copy of your source code on a flash drive or Canvas (.java file). Your program will be graded as follow: Correctness/Efficient: 40 points Test Cases: 5 points Documentation/Coding Style: 8 points Presentation/Demonstration: 7 points
games.txt
100A 2 1 20 50 100 200 1000 5 100 100 200 500 1000
players.txt
0 100 1 500 1234 Jane Smith 1 300 3455 John Smith 0 500 2 1000 9867 Hot Shot 0 200 0 300 2 2000 5555 Charles B
gamesMulModels.txt
100A 2 1 20 50 100 200 1000 5 100 100 200 500 1000 100B 3 1 10 50 100 200 1000 5 100 50 100 500 2000 2 20 10 20 50 100
CSCI 145 -- Project 4 (Advance Game of Roulette) Due Thursday, 12/07/2017 No Late Projects Accepted Problem Statement A company intends to offer various versions of roulette game and it wants you to develop a customized object-oriented software solution. This company plans to offer one version 100A now (similar to the simple version in project 2 so refer to it for basic requirements, but it allows multiple players per game (up to 5) and multiple games (up to 5) and there are now 38 positions on the wheel: 00,0, 1 to 36, and the payoff for a number bet is 35 to 1) and it is planning to add several more versions in the future with more betting options. Each game has a minimum and maximum bet and it shall be able to keep track of its id, chips, money, active players, and transactions. Available chips for cach game shall consist of S1, S5, $25, and $100. Each transaction shall consist of a transaction number, player number (seat number), and relevant betting information. A player can be a regular player, a VIP player, or a super VIP player. Each player keeps track of his/her own money and chips. Both types of VIP players have a 4-digit id and name as well. The system keeps track of all bets and awards 5% cash back credit rounding up to a whole dollar of all the bets to a VIP player after he or she leaves the game. In addition to getting back 5% cash back credit like a VIP player, a super VIP player gets a bonus amount based on the number of bets after he or she leaves the game ($20 for at least 10 bets and up to 20 bets, S50 for more than 20 bets). A player can determine his/her winning amount when he or she leaves the game (include cash back credit if applicable). The system will load all games with data from an input data file upon startup. It is recommended to use a Java Queue to keep track a list of all available players so you can add a new player to the rear and remove a player at the front. The user (game operator) will be able to conduct one selected game at a time. The main menu should contain the following options: Main Menu I. Select a game 2. Add a new player to the list . Quit If option 1 is chosen, the user will be prompted to select a game from a list of available games and a game menu is available as shown below. When option 2 is selected, obtain necessary data and add a new player to the list of available players. When option 3 from the main menu is selected, print complete information for each game to a new text file before the program is I. Add a player to the game 2. Play one round CSCI 145 -- Project 4 (Advance Game of Roulette) Due Thursday, 12/07/2017 No Late Projects Accepted Problem Statement A company intends to offer various versions of roulette game and it wants you to develop a customized object-oriented software solution. This company plans to offer one version 100A now (similar to the simple version in project 2 so refer to it for basic requirements, but it allows multiple players per game (up to 5) and multiple games (up to 5) and there are now 38 positions on the wheel: 00,0, 1 to 36, and the payoff for a number bet is 35 to 1) and it is planning to add several more versions in the future with more betting options. Each game has a minimum and maximum bet and it shall be able to keep track of its id, chips, money, active players, and transactions. Available chips for cach game shall consist of S1, S5, $25, and $100. Each transaction shall consist of a transaction number, player number (seat number), and relevant betting information. A player can be a regular player, a VIP player, or a super VIP player. Each player keeps track of his/her own money and chips. Both types of VIP players have a 4-digit id and name as well. The system keeps track of all bets and awards 5% cash back credit rounding up to a whole dollar of all the bets to a VIP player after he or she leaves the game. In addition to getting back 5% cash back credit like a VIP player, a super VIP player gets a bonus amount based on the number of bets after he or she leaves the game ($20 for at least 10 bets and up to 20 bets, S50 for more than 20 bets). A player can determine his/her winning amount when he or she leaves the game (include cash back credit if applicable). The system will load all games with data from an input data file upon startup. It is recommended to use a Java Queue to keep track a list of all available players so you can add a new player to the rear and remove a player at the front. The user (game operator) will be able to conduct one selected game at a time. The main menu should contain the following options: Main Menu I. Select a game 2. Add a new player to the list . Quit If option 1 is chosen, the user will be prompted to select a game from a list of available games and a game menu is available as shown below. When option 2 is selected, obtain necessary data and add a new player to the list of available players. When option 3 from the main menu is selected, print complete information for each game to a new text file before the program is I. Add a player to the game 2. Play one roundStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started