Question: In this project, you are asked to implement the game of Monopoly using object-oriented programming - Java. At a minimum, your solution(s) should have the
In this project, you are asked to implement the game of Monopoly using object-oriented programming - Java. At a minimum, your solution(s) should have the following classes: Square, TaxSquare, BuyableSquare, PropertySquare, UtilitySquare, RailroadSquare, Player, Card, Monopoly, and a class with a main method. It is up to you to figure out what should go in each of the classes and their relationship with one another. NOT all monopoly rules will be implemented or are original. DO NOT upload all the classes in one java file. Avoid duplicate code as much as possible. You should document your methods in details with short descriptions (no need for input/output comments). Implement the game however you wish as long as you meet the requirements noted below.
A detailed UML Diagram must be submitted with a briefly explain why did you choose to implement the game in the way you did. A minimum of three paragraphs of text is required.
Class Specific Notes:
Monopoly
Decide how to store your game board and store it in this class (array, linked list, etc.) along with any game specific logic.
Should have 2 arrays for the chance & community cards.
This class should handle the main logic of the game.
Square
You can use this class for the four corners of the board & the community and chance squares (You do not need to split up go, jail, free parking, go to jail, chance, or community chest into 6 different classes).
RailroadSquare
Railroads rent is based off of the number of railroads owned ($25, $50, $100, $200).
UtilitySquare
Rent should be determined by the formula: (dice roll * multiplier).
Text File Formats & Information:
community.txt
Advance to Go: Move player to go square.
Doctor Fees: Subtract $100 from players money.
Go to Jail: Move player to jail square & skip next turn.
School Fees: Subtract $200 from players money.
PFD: Add $350 to players money.
chance.txt
Take A Walk On The Boardwalk: Move player to Boardwalk.
Advance to Illinois Ave.: Move player to Illinois Ave.
Advance to Nearest Utility: Move player to nearest utility.
Advance to Nearest Railroad: Move player to nearest railroad.
You Won The Lottery: Add $1000 to players money.
squares.txt
Values are separated by commas. First number identifies what class it corresponds to.
Square (1): Square name
PropertySquare (2): Square name, color, price, rent, price w/ 1 house, price w/ 2 houses, price w/3 houses, price w/ 4 houses.
TaxSquare (3): Square name, tax price
RailroadSquare (4): Square name, rent
UtilitySquare (5): Square name, price, multiplier value
pieces.txt
You can use this file or create your own file of 5 game pieces.
Additional Requirements & Information:
Read in the provided txt files to set up your gameboard.
Original win conditions do not need to be implemented. Simulate the game for 10 turns and then display the winner (most money) instead.
Trading/Selling property does not need to be implemented (not required).
No bonuses need to be implemented if a player owns all properties of the same color.
Support up to 5 players at the same time.
DISPLAY output messages of what is happening (where a player landed, money balance, and any actions that took place).
Gain $200 if player lands on OR passes go.
Players should start with $1500.
Properties can only have up to 4 houses (no hotels).
Houses cost $50.
Jail time is 1 turn.
Free Parking gives player $20
All squares should be implemented with their appropriate action.
Players traverses the board correctly using 2, 6-sided dice. (Update location)
Player can buy square at current spot if it is not owned & buyable.
Landing on a square owned by another player should correctly deduct the rent from the current players wallet and add it to the owners wallet.
Properties rent changes with the number of houses on it (numbers given in txt file).
If a player lands on a Chance or Community Chest square, pick a random card from the relevant Card array and execute the appropriate action.
Tax Squares should deduct the specified amount from the players wallet.
Players should randomly get assigned one of the game pieces from the .txt file.
chance.txt (Content in Text File)
Take A Walk On The Boardwalk Advance to Illinois Ave. Advance to Nearest Utility Advance to Nearest Railroad You Won The Lottery
community.txt (Content in Text File)
Advance to Go Doctors Fees Go to Jail School Fees PFD
pieces.txt (Content in Text File)
Thimble Top Hat Boot Battleship Racecar
squares.txt (Content in Text File)
1,GO 2,Mediterranean Avenue,Purple,60.0,2.0,10.0,30.0,90.0,160.0 1,Community Chest 2,Baltic Avenue,Purple,60.0,4.0,20.0,60.0,180.0,320.0 3,Income Tax,200.0 4,Reading Railroad,200.0,25.0 2,Oriental Avenue,Light Blue,100.0,6.0,30.0,90.0,270.0,400.0 1,Chance 2,Vermont Avenue,Light Blue,100.0,6.0,30.0,90.0,270.0,400.0 2,Connecticut Avenue,Light Blue,120.0,8.0,40.0,100.0,300.0,450.0 1,Jail/Just Visiting 2,St. Charles Place,Pink,140.0,10.0,50.0,150.0,450.0,625.0 5,Electric Company,150.0,4 2,States Avenue,Pink,140.0,10.0,50.0,150.0,450.0,625.0 2,Virginia Avenue,Pink,160.0,12.0,60.0,180.0,500.0,700.0 4,Pennsylvania Railroad,200.0,25.0 2,St. James Place,Orange,180.0,14.0,70.0,200.0,550.0,750.0 1,Community Chest 2,Tennessee Avenue,Orange,180.0,14.0,70.0,200.0,550.0,750.0 2,New York Avenue,Orange,200.0,16.0,80.0,220.0,600.0,800.0 1,Free Parking 2,Kentucky Avenue,Red,220.0,18.0,90.0,250.0,700.0,875.0 1,Chance 2,Indiana Avenue,Red,220.0,18.0,90.0,250.0,700.0,875.0 2,Illinois Avenue,Red,240.0,20.0,100.0,300.0,750.0,925.0 4,B. & O. Railroad,200.0,25.0 2,Atlantic Avenue,Yellow,260.0,22.0,110.0,330.0,800.0,975.0 2,Ventnor Avenue,Yellow,260.0,22.0,110.0,330.0,800.0,975.0 5,Water Works,150.0,5.0 2,Marvin Gardens,Yellow,280.0,24.0,120.0,360.0,850.0,1025.0 1,Go to Jail 2,Pacific Avenue,Green,300.0,26.0,130.0,390.0,900.0,1100.0 2,North Carolina Avenue,Green,300.0,26.0,130.0,390.0,900.0,1100.0 1,Community Chest 2,Pennsylvania Avenue,Green,320.0,28.0,150.0,450.0,1000.0,1200.0 4,Short Line,200.0,25.0 1,Chance 2,Park Place,Dark Blue,350.0,35.0,175.0,500.0,1100.0,1300.0 3,Luxury Tax,75.0 2,Boardwalk,Dark Blue,400.0,50.0,200.0,600.0,1400.0,1700.0
Extra Credit:
Print the current state of the board every turn in a meaningful way (print statements, java FX, swing, etc.). Depending on how you store your gameboard, this may prove to be difficult. If you intend to do this, think of a way to store your gameboard that will make this part easy.

Monopoly$ javac *.java Monopoly$ java Driver many players? 2-5 How 2 Enter name for player # 1: John John is the Battleship Enter name for player # 2: Amy Amy is the Top Hat John's Dice roll -6. Battleship landed on Oriental Avenue with 1500.0 dollars. For Sale. $100.0 Would you like to purchase? y or n y turn. Amy's Dice roll - 6. Top Hat landed on Oriental Avenue with 1500.0 dollars. This propery is owned by turn John. You owe 6.0 John's turn. You own Oriental Avenue. Would you like to buy a house? Enter y or n: Monopoly$ javac *.java Monopoly$ java Driver many players? 2-5 How 2 Enter name for player # 1: John John is the Battleship Enter name for player # 2: Amy Amy is the Top Hat John's Dice roll -6. Battleship landed on Oriental Avenue with 1500.0 dollars. For Sale. $100.0 Would you like to purchase? y or n y turn. Amy's Dice roll - 6. Top Hat landed on Oriental Avenue with 1500.0 dollars. This propery is owned by turn John. You owe 6.0 John's turn. You own Oriental Avenue. Would you like to buy a house? Enter y or n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
