Presentation is loading. Please wait.

Presentation is loading. Please wait.

MMTS Architectural Object-Oriented Design. MMTS +int main(String[] args) GameController +playGame() -List board -Player[] players Player -void bankrupt()

Similar presentations


Presentation on theme: "MMTS Architectural Object-Oriented Design. MMTS +int main(String[] args) GameController +playGame() -List board -Player[] players Player -void bankrupt()"— Presentation transcript:

1 MMTS Architectural Object-Oriented Design

2 MMTS +int main(String[] args) GameController +playGame() -List board -Player[] players Player -void bankrupt() -void improve() +void pay(int amount) +void updatePosition(Space newPos) -int id -int money -Space position -Card outOfJailChance -Card outOfJailChest Space [See Later Slide] Bank +void pay(int amount) Entity +void purchase() +void payRent(Entity payer, int amount) -List properties BankruptcyException -Player bankrupt -Player payee -int rentOwed Exception

3 Space -name: String FreeParking +land() IncomeTax +land() Rentable +land() -Entity owner -int[] rent Go, Just Visiting, Luxury Tax, “Rent” Card > Groupable +land() -int groupSize -String group Railways, Utilities > Java.util.comparable Mortgagable +land() +isMortgaged() +mortgage() +unMortgage() +compareTo() -boolean mortgage Housable +land() +hasHotel() +improve(Player owner) +int disprove() +int houses +int housePrice Normal Properties > GroupRent +land() GetOutOfJail +land() GoToJail +land() Go to Jail Space and Card > Movement +land() e.g. “Move to Boardwalk” Pass Go Rules Always Apply >

4 CommunityChestDeck +shuffle() +draw() +remove() +insert() -cards: List > Dice +getDice() +roll() -Dice: Dice[] > ChanceDeck +shuffle() +draw() +remove() +insert() -cards: List >

5 Report -int mostMoneyHeld[] -int totalNetIncome[] -int totalGrossExpenses[] -int totalNetWorth[] -int highestGrossIncomeInTurn[] -int highestGrossExpensesInTurn[] -int boardCounts[] -int roundsPlayed[] -int propertiesMortgaged; -int propertiesUnmortgaged; -int rentsCollected[] -int timesSentToJail[] -int chanceDrawn[] -int chestDrawn[] -List propertiesOwned[] -int housesBought[]; -int hotelsbought[]; -int doublesRolled[]; + void reset() + void generateReport() + void boughtProperty() + void assessedRent() + void assessedTax() + void purchasedHouse() + void purchasedHotel() + void purchasedProperty() + void mortgagedProperty() + void unmortgagedProperty() + void sentToJail(Player player) + void drewChance(Player player) + void drewCommunityChest(Player player) + void rolledDoubles(Player player) >


Download ppt "MMTS Architectural Object-Oriented Design. MMTS +int main(String[] args) GameController +playGame() -List board -Player[] players Player -void bankrupt()"

Similar presentations


Ads by Google