Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Cert IV Multimedia / Web Design

Object Modelling
And Class Diagrams

“An object is an instantiation of a class.”

A Class is a blueprint & anything produced from that blueprint is an object of that class.

Class Name
Properties (what the class has)
Methods (what the class can do)

One of the objects you are familiar with so far is a button. A button is an object of the
Button Class. The diagram below shows a simple Class diagram for a button (the real class
diagram contains much more detail).

Button
Name:
Text:
Visibility:
Show()
Focus()

Classes are also used to model data. Consider the following example:

Student
StudentName: String
DOB: Date
EnrolmentDate: Date
CampusName: String
StudentNumber: String
New()
LogOnNetwork(StudentName: String, StudentNumber:
String)

This example models the data required to create and use an object called ‘Student’.

The ‘Properties’ region of the Class Diagram, describes the structure of the data – these are
the things that ‘Student’ has. Each property is followed by a data type.

The ‘Methods’ region of the Class Diagram describe the operations that the Student Class
can perform – these are the things that ‘Student’ can do.

Every class includes a New() method which is the Constructor for the class. An object
cannot be instantiated from the class without a New() method. An argument list is optional.

In this example, there is a ‘LogOnNetwork’ method which requires two arguments. Each
argument in the list is followed by a data type.

You might also like