QUESTION 3 Identify class name, attributes, operations, associations and create a UML clas diagram based on the following Java code. 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 Plane( ) { myPropeller = new Propeller[2]; myPropeller[0] = new Propeller( ); myPropeller[1] = new Propeller( ); myEngine = new Engine( ); } } public class Pilot { public int flightHours; public void fly(Plane p) { } } public class FighterPilot extends Pilot { public int rank; }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 3RQ
icon
Related questions
Question
QUESTION 3
Identify class name, attributes, operations, associations and create a UML class
diagram based on the following Java code.
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 Plane( ) {
myPropeller = new Propeller[2];
myPropeller[0] = new Propeller( );
myPropeller[1] = new Propeller( );
myEngine = new Engine( );
}
}
public class Pilot {
public int flightHours;
public void fly(Plane p) {
}
}
public class FighterPilot extends Pilot {
public int rank;
}
Transcribed Image Text:QUESTION 3 Identify class name, attributes, operations, associations and create a UML class diagram based on the following Java code. 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 Plane( ) { myPropeller = new Propeller[2]; myPropeller[0] = new Propeller( ); myPropeller[1] = new Propeller( ); myEngine = new Engine( ); } } public class Pilot { public int flightHours; public void fly(Plane p) { } } public class FighterPilot extends Pilot { public int rank; }
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage