CMPUT 301

Software Engineering

A1/A2 18th September Class Exercise


Class Participation Exercise Sept 18

Imagine a mobile application designed for the world of Dungeons & Dragons (D&D). This application serves as a tool for managing and tracking character stats, and creating and customizing D&D characters. It keeps track of stats such as strength, dexterity, constitution, intelligence, wisdom, and charisma.

There is a spell management system. In the context of D&D, a spell is a magical effect conjured by a character. Each spell has specific effects, casting time, range, and duration. A spellbook is a collection of spells that a character knows and can use during gameplay. The application allows users to add or remove spells from their character’s spellbook, effectively managing their repertoire of spells.

The concept of spell slots represents the energy a character has to cast spells. Each spell requires a certain level of energy, represented by the level of the spell slot. The application tracks the usage of these spell slots, helping users manage their character’s magical energy efficiently.

The application also monitors the character’s health through hit points, tracks their progress through experience points.

A key feature of this application is its detailed inventory management system. In the context of D&D, a character’s inventory can include a wide range of items. These can be weapons like swords and bows, armor like shields and helmets, adventuring gear like ropes and torches, tools like thieves’ tools and musical instruments, and even magic items like potions and scrolls. The application allows users to add or remove items from their character’s inventory, effectively managing their collection of items.

The inventory management system also keeps track of the weight of the items, as carrying too many heavy items can slow a character down. It provides detailed information about each item, such as its properties, value, and description.

One special item that can be managed in the inventory is the “Bag of Holding”. In D&D, a Bag of Holding is a magical item that can hold more items than its size would suggest. It’s a small sack, but its inside is larger than its outside dimensions. Regardless of what is put into the bag, it weighs a fixed amount. This makes it highly valuable for characters carrying many items. The application should be able to handle such special items and their unique properties.

Based on this description, design a UML class diagram that represents the structure of this application. Consider the classes, their attributes, methods, and relationships.

Add your name and your partner's name (if you have one) to the diagram. If you do not put your name on the file you will get a zero.

Upload a screenshot. If you worked in a pair, get the screenshot from your partner and upload the same screenshot.

You can screenshot a diagrammer of your choice, or draw it on paper and take a photo, or you can draw it with a tablet.

Here are some free diagrammers:

Here's a handy diagrammer online: https://app.diagrams.net/
IF that one doesn't work for you, try a different one.
Here's a Java one: https://www.umlet.com/changes.htm (download the stand alone)