Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Tips and Basics of UML Class Diagrams -Liz Ha
UML Class Diagrams provide an overview of your entire program.
Template to draw a class:
To describe a class:
To describe relationship between the classes:
In the above Class Diagram, it depicts two classes: class Car and class Engine.
Looking at class Car, you can see that it has:
Looking at class Engine, you can see that it has:
- a public attribute vin number (a string)
- a private attribute serial number (an integer)
- a public method addEngine that takes in an Engine object as a parameter and returns a boolean
The line and diamond shape between the two boxes shows that Car has an Engine as a component part.
- a public class variable nextNumber (of type integer)
- a public method horsepower that returns an integer
The 0..1 above that line toward Engine shows that the engine is option (Car may have no engine or 1 engine)
Link to this Page
- Cases last edited on 30 July 2011 at 2:33 am by r59h132.res.gatech.edu