MidTerm Study Guide - COE618 Midterm Study Guide Q1 Given the following Java code draw a UML class diagram public class Propeller cfw public double

MidTerm Study Guide - COE618 Midterm Study Guide Q1 Given...

  • Ryerson University
  • COE 618
  • Test Prep
  • Pakistani
  • 4
  • 100% (1) 1 out of 1 people found this document helpful

This preview shows page 1 - 3 out of 4 pages.

COE618 Midterm Study Guide Q1. Given the following Java code, draw a UML class diagram. public class Propeller { public double thrust; public int mileage; } public class Engine { public double power; public int mileage; } public class Plane { public Propeller[] myPropellers; public Engine myEngine; } public class Pilot { public int flightHours; public void fly(Plane p) { ... } } public class FighterPilot extends Pilot { public int rank; } Propeller thrust : double mileage : int Engine power : double mileage : int Plane myPropellers : Propeller[ ] myEngine : Engine Pilot flightHours : int fly(Plane) : void FighterPilot rank : int * 1
Image of page 1