- Objective:
- To create a casino simulation.
- Your application must have at the very least 4 games:
- Go Fish a card game
- BlackJack a card game
- Craps a dice game
- Slots a mechanical game
- The project should include some concept of each of the following classes.
- Description:
Profilestores a casino-visitor'sid,name, andbalance.
Profileobjects should be created within the context of a casino.Profileobjects storeprofileId,username, andbalance.
-
Description:
PlayerInterfaceis a contract to ensure that all players have reference to aprofile,name, andid.
-
PlayerInterfaceshould declare 3 methodsProfile getProfile()String getName()Long getId()
- Description:
- Represents a player within the context of a game.
- should cease to exist upon termination of a game.
Playershould implementPlayerInterfacePlayerobjects should be created within the context of a game.
- Description:
- Represents a game which handles some type of player.
- should be parameterized with a generic type whose upper bound is
PlayerInterface.- e.g. -
SomePlayerTypeis a subclass ofPlayerInterface. - This restricts the types of players this game can interact with.
- e.g. -
GameInterfaceshould declare each of the following methods:TypeOfPlayer[] getPlayers()TypeOfPlayer getPlayer(Long playerId)void addPlayer(TypeOfPlayer player)void removePlayer(TypeOfPlayer player)Boolean contains(TypeOfPlayer player)
-
Description:
GameEngineInterfaceis a contract which ensures a specific type ofGameEngineoperates on a specific type ofPlayerand a specific type ofGame
-
should be parameterized with two generic types
GameTypePlayera sub class ofPlayerInterfaceGameTypea sub class ofGameInterface<GameTypePlayer>
-
should declare three method signatures
GameType getGame()- return the composite Game object to the client.
void evaluateTurn(GameTypePlayer player)- evaluate the turn of a player,
void run()- begin game
- Description
GameEngineensures all sub-classes provide aGameobject upon instantiation.
- should be parameterized with two generic types
GameTypePlayera sub class ofPlayerInterfaceGameTypea sub class ofGameInterface<GameTypePlayer>
- should implement a
GameEngineInterface<GameType, GameTypePlayer> - should defer the definition of
evaluateTurnandrunto sub-classes.
- Description
- Contract which ensures that a class enforces some aspect of waging money.
- Go fish is a friendly game and should not involve gambling.
BlackJackandGoFishare both Card Games and should therefore inherit from a commonCardGame.- Any common logic or fields between the games should live CardGame class, not BlackJack nor GoFish.
- You must have a completed and approved UML diagram before you proceed to do any development
- You can either work by yourself, or in a group no bigger than 3.
- All public methods should be tested.