



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This tutorial focuses on classes, interfaces, and inheritance using UML diagrams and standards. Topics include examining relationships between classes, identifying association, aggregation, and composition relationships, and creating class diagrams for various classes. Students will learn to answer questions about a system using UML and understand the different types of relationships.
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!




This week we will look at classes, interfaces and abstraction, with a particular focus on inheritance. We’ll use UML diagrams and standards to understand and answer questions about a system. 1: Examine the following simple relationship in the following diagram: a. What type of diagram is this? b. What is the relationship between the Rugby and Match Classes? c. What is the multiplicity between Match and Player? d. What type of class do you think Match is likely to be?
The following UML class diagram describes a way to model sea ports and large ships. We’ll be examining this example in detail as it includes the association, aggregation, composition and interface relationships.
public class Car { private int year; private String make; private double price; private double currentSpeed; private String currentGear; public Car(int year, String make, double price, double currentSpeed, String currentGear) { … } public double getCurrentSpeed() { return currentSpeed; } public void incrementSpeed(double speed){ currentSpeed+= speed; } public String getCurrentGear(){ return currentGear; } } b.) The Car class above Now create the following class diagrams, drawing the appropriate associations and multiplicities between classes: c.) There is a Lecturer and Course class. Each lecturer has a name and a list of courses they are teaching, which can be zero or more. Each course has a name, course number and room and must be taught by exactly one Lecturer.