Showing posts with label UML. Show all posts
Showing posts with label UML. Show all posts

Monday, 15 April 2013

Campus Project Team A


UML Model


  • There are many buildings on campus.
  • Each building has a building number, a number of exits, and contains many rooms.
  • Each room has a room number, a room size, and a seating capacity.
  • Some rooms are computer labs and have many computers.
  • Each computer has an asset number and a tag & test date
  • Some rooms have a single overhead data projector.
  • Each overhead data projector has an asset number and a tag & test date.


Additional functionality/notes:

  • Add & remove buildings from campus.
  • Add & remove rooms from building.
  • A building must have a unique building number.
  • A room must have a unique room number.
  • Campus rooms can be searched by room number, to return the matching room.
  • Campus rooms can be searched by seating capacity, to return the matching rooms.
  • Computers & overhead data projectors must have a unique asset number.

Original Post Aug 20th 2012

Group Activity - Inheritance



A Player has the following attributes: 

  • Name
  • Health
  • Strength
  • intelligence
  • Location
    • X coordinate
    • Y coordinate
  • Inventory
    • a collection of InventoryItem's - each InventoryItem has the following attributes
      • ID
      • Price
      • Weight.
A Weapon is a type of InventoryItem. It has a single int attribute: DPS. 
  • An object of Weapon type may be constructed with or without providing a value for this attribute. 
    • A Gun is a type of Weapon. It has a single int attribute: ammoCount. A value for this attribute must be provided in the constructor. 
    • A Stick is a type of Weapon. It has a single int attribute: stickLength. A value for this attribute must be provided in the constructor.


A Tool is a type of InventoryItem. It has a single int attribute: numberOfUses. 

  • An object of Tool type may be constructed with or without providing a value for this attribute. 
    • A Key is a type of Tool. It has a single String attribute: keyName. A value for this attribute must be provided in the constructor. 
    • A Mirror is a type of Tool. It has a single String attribute: mirrorName. A value for this attribute must be provided in the constructor.


Original Post Jul 29th 2012

Inheritance Scenario: XYZ



yClass is a type of xClass. 

A XClass has 3 int states, x,y & z. 

An object of the xClass may be created by providing a value for all 3 of these states and also by providing only x & y. 

The yClass has 2 int states, a & b. 

An object of the yClass may be created by providing a value for a, or values for both a & b. 

The zClass is a type of yClass and has 1 int state called c. 

An object of the zClass may be created with or without supplying a value for c.

Original Post Jul 23rd 2012

Blog Task - The Constructor



Wow this turned out to be a big class.

I viewed this Player Account and treated it in a way similar to World of Warcraft.

Each player has a Player Account that must be set up before you can create avatars to play.

Each Player Account has required parameters and also have data types that are themselves class objects.

The DOB class has 3 states, dd, mm, and yyyy.

The Avatar class has 4 states, name, race, sex and class.

Original Post Jun 23rd 2012 

Blog Task - Encapsulation and Visibility


Accessors and Mutators allow exterior objects read or modify access to an objects public states and behaviours.

In UML diagrams each Accessor and Mutator is preceeded by a plus sign, ( + ), which identifies that the object state or behaviour is public.

In UML diagrams a minus sign, ( - ), denotes a state or behaviour is private, and as such is not acceable by on outside object.


What is an Accessor?

An Accessor allows outside objects to read the state or behaviour of an object. 
Accessors are also known as Getters.


What is a Mutator?

A Mutator allows outside objects to modify the state or behaviour of an object.
Accessors are also known as Setters.

Original Post Jun 23rd 2012 

Friday, 12 April 2013

UML - Group Task - Class Diagram - Courtyard



I have scanned the original but it is very faint so I redrew it 

Original Post May 3rd 2012

UML - Data Types In The Wild - Class Diagram - Quiver



As my Avatar in the previous post is an Archer I created a Quiver class

The quiver has a maximum arrow capacity and weight 

It can also only be equipped by an Archer

It increases the Archer accuracy skill

Original Post May 3rd 2012

UML - Data Types In The Wild - Class Diagram - Player



I have a main class called Player Account 

  • The main class has many states
  • The main class can have many objects 


I have an object of the main class called Player Avatar 

  • Each object of the main class has its own states and behaviours


Original Post May 3rd 2012

UML - First Class Diagram - Aeroplane


Original Post May 3rd 2012

Thursday, 11 April 2013

Java UML

Original Post Mar 18th 2012