Scenario

You will need to create an object-oriented design diagram for a maze builder program, which will be implemented in your next assignment. A few questions must also be answered about how certain operations will work, in context of the design that has been created.

The design process will involve writing a class hierarchy to store information about the maze area, as well as the rooms within the maze, the items contained within a room, exit points, etc.

The maze system design must also provide a unified “front end” to an (as yet undefined) userinterface portion of the program, through the provision of a “maze engine” façade class that provides a single point of call for all high level maze operations.

Maze System Scenario

The maze scenario will need to be modelled as a number of entities. A description of the main entities involved in the system, and their behaviours, are detailed below.

Very Important Note: the entities described below are not the only ones in the system. You will need to identify and define the others, and how they operate in the game (for example; various data holder and structure classes to facilitate easy data encapsulation and storage).

The Player

When the maze is being traversed, it is being done so by a player. This player has a name, and a health status integer. The player’s health status will be affected by various items present in the maze, as described in further detail below.

The player does not have an “inventory”, nor can they pick up or drop items.

The Maze Space

The maze is defined as a three-dimensional space, inside of which positions are denoted by three grid reference integers (x, y, z).

This maze space is used for two distinct purposes: building a maze, and traversing it. The details of what these two functionalities require are described in further detail below. It is important to note that not all user interfaces that will attach to the maze engine will take advantage of both functionalities; e.g. a game may only require traversability.

Inside this maze space, rooms are defined as being present at a particular coordinate space. Each room has a name, and a number of unidirectional exit points (e.g. if a path leads from room A to room B, that does not automatically imply that there is a path from room B to room A.) Each exit point has a name, and a destination grid reference. The destination grid reference must lead to an existing room.

Exit points do not necessarily “border” the existing room – for example, an exit point named “secret door” or “teleporter” for a room may lead to an area far away in the maze space.

Each space also can store a collection of items, which have a name and a “health” value which would affect a traverser of the maze. Health values may be positive or negative.

In order for a maze to be complete, there must be rooms set as a “start” and a “finish”.

Using the Maze Space: Building

The first major functionality of the maze space is that it should be buildable. That is, there should be functionality that allows the maze to be added to. At a minimum, operations such as those below should be allowed by a user of the maze builder system:

  • Get the size of the maze space
  • Get a list of all rooms in the maze space
  • Set “start” and “finish” grid references for the maze
  • Create a new room
  • Add an exit point for a new room
  • Remove an exit point for a new room
  • Add an item to a room
  • Remove an item from a room
  • Get a room at a particular grid reference
  • Get a list of all items in a room
  • Get a list of all exit points in a room

Using the Maze Space: Traversing

The second major functionality of the maze space is that it should be traversable. This means that methods should exist that allow for a player to access one room from another and complete the maze, along with any associated methods to facilitate this. The following functionality is considered a minimum amount for a maze system to be traversable:

  • Initialise the traversal (player name/health, check that maze is complete, etc.)
  • Get the player’s name and current health
  • Get the size of the maze space
  • Get a list of all rooms in the maze space
  • Get the name of a room at a particular grid reference
  • Get a list of all items in a room
  • Get a list of all exit points in a room
  • Move to a new grid reference, given a current grid reference and exit point name, health issues notwithstanding

Implementing the Maze Space

Attention must be paid towards how the maze space is implemented. This will include, at least, the following considerations to be made:

  • The entities present in the scenario, and the relationships between them
  • Communication from one object to another
  • The attributes and methods of each object
    • Attribute type, name, and visibility
    • Method signature, return type and visibility
  • How high-level maze operation instructions will be issued (initially) from the maze engine façade class, which then filter down to the engine internals
  • How data collections are to be stored and arranged
  • How errors and exceptional circumstances are to be reported

Design Task

Design the class structure for each of these sections. This must be documented as a UML class diagram. You should take advantage of object-oriented concepts such as association, composition, inheritance, method overriding, abstract classes, interfaces, visibility and other relevant properties

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.