Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the code and UML diagram below, fill in the blanks with the correct keywords or class names. If a keyword is missing from the

Using the code and UML diagram below, fill in the blanks with the correct keywords or class names. If a keyword is missing from the code, fill in the keyword that fits. If the class or data is missing from the UML, fill in the correct information.

image text in transcribed

public class Vehicle {

_________ int numWheels;

_________ Vehicle(int numWheels)

{

this.numWheels = numWheels;

}

public int getWheels() {

return wheels;

}

}

public class Car _________ Vehicle {

_________ int numDoors;

_________ boolean isElectric;

public Car (int numWheels, int numDoors, boolean isElectric) {

_________(numWheels);

this.numDoors = numDoors;

this.isElectric = isElectric;

}

public int getNumDoors() {

return _________;

}

public boolean getIsElectric() {

return isElectric;

}

}

public class Bicycle _________ Vehicle {

//Mountain bike, road bike, recumbent bike.. etc

_________ String bikeType;

public Bicycle(int numWheels, String bikeType) {

super(numWheels);

this.bikeType = _________;

}

public _________ getBikeType() {

return bikeType;

}

}

public class Convertible _________ Car {

//Soft top or rag top, or hard top

_________ String roofType;

public Convertible(int numWheels, int numDoors, _________ isElectric, String roofType) {

super(numWheels, _________, _________);

this.roofType = roofType;

}

_________ String getRoofType() {

return roofType;

}

}

int numWheels int Bicycle int numDoors; boolean String getBikeType() boolean getlsElectic() Convertible String String getRoofType()

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

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions