Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a practical that im practicing through for my exam, so attached is the UML diagram and the code to it (java). i need

This is a practical that im practicing through for my exam, so attached is the UML diagram and the code to it (java). i need help explaining it. i dont understand why the one diamond is coloured and the other not , and the setMethod for Engine it includes the engines instance variables in the vehicle class

imageimageimageimage

-numCylinders: int Engine Vehicle -manufacturer: String -engine: Engine -registration: Registration < > Vehicle(manufacturer: String, noCylinders: int, displacement: double, registration: Registration) +set Manufacturer(manufacturer:String): void +setEngine(noCylinders:int, displacement: double): void +setRegistration(registration: Registration): void +getManufacturer(): String +getEngine(): Engine +getRegistration(): Registration +toString(): String -displacement: double < > Engine(noCylinders: int, displacement: double) +setNumCylinders(noCylinders: int): void +setDisplacement(displacement: double): void +getNumCylinders(): int +getDisplacement: double +toString():String Registration -alphaField: String -numericField: String -provinceCode: String | < > Registration(alphaF: String, numF: String. provC: String) +setAlphaField(alphaF: String): void +setNumericField(numF: String): void +setProvinceCode(provC: String): void +getAlphaField(): String +getNumericField(): String +getProvinceCode(): String +getRegistration(): String +toString():String

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Applying Communication Theory For Professional Life A Practical Introduction

Authors: Marianne Dainton, Elaine D. Zelley

4th Edition

150631547X, 978-1506315478

More Books

Students also viewed these Programming questions