1 / 5

MMTS Architectural Object-Oriented Design

This project showcases the design and implementation of a Monopoly-inspired game using object-oriented principles. The game features components like players, properties, and actions like bankruptcy, purchasing, and rent management. Players interact with various spaces, draw cards, and face challenges such as going to jail or managing properties. Key features include player bankruptcies, property improvements, and an income report system. This design ensures a structured approach to gameplay, emphasizing modularity and code reusability.

idana
Download Presentation

MMTS Architectural Object-Oriented Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MMTSArchitectural Object-Oriented Design

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

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

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

  5. <<singleton>> Report -intmostMoneyHeld[] -inttotalNetIncome[] -inttotalGrossExpenses[] -inttotalNetWorth[] -inthighestGrossIncomeInTurn[] -inthighestGrossExpensesInTurn[] -intboardCounts[] -introundsPlayed[] -intpropertiesMortgaged; -intpropertiesUnmortgaged; -intrentsCollected[] -inttimesSentToJail[] -intchanceDrawn[] -intchestDrawn[] -List<Property> propertiesOwned[] -inthousesBought[]; -inthotelsbought[]; -intdoublesRolled[]; + 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)

More Related