Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am specifically looking for number 18, fill in the blank questions. please? Code Completion (13 points) Name: 0Samma CMSC 256 Test 1 18. Using
I am specifically looking for number 18, fill in the blank questions. please?
Code Completion (13 points) Name: 0Samma CMSC 256 Test 1 18. Using the code and UML diagram, 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. public elass Convertible Car publi cle //Soft top or rag top, or hard top 4rint- nt numwheels String roofType hicle(int numkheels) ( els > 0) public Convertible(int numwheels, int numDoors isElectric, if . String roofType) this.nunWheels nunWheels super (nunwheels this.roofType roofType getwheels) turn wheels; String getRoofType() return roofType pubYic class c Vehicle int numDoors boolean isElectric 19. [4 points Given the inheritance diagram of the previous question, label the following statements either public Caf (int els, int nunDoors, boolean isElectric) [ valid or invalid. Invalid a. Vehicle car-new Vehicle) b. Car bessie new Vehicle) c. vehicle windy-new Convertable): d. Bieyele bike new Car)i (numwheels) this.n -numDoorsi valid this.isElectric isElectrici Valid Valid Invalid nvalid public int getNumDoors() return public boolean getIsElectric) return isElectricStep 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