Answered step by step
Verified Expert Solution
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
-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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started