Question: task 1 java lang 2:15 Back Wo2 Lab Advanced objects.docx CS 143 Lab 2: Advanced Objects Winter 2021 Task 1. Inheritance. (5 points, 1 point

task 1 java lang task 1 java lang 2:15 Back Wo2 Lab Advanced objects.docx CS 143

2:15 Back Wo2 Lab Advanced objects.docx CS 143 Lab 2: Advanced Objects Winter 2021 Task 1. Inheritance. (5 points, 1 point per question) Read the review questions at http://java.conestoftheday.com/ava-inheritance practice coding-questions. Then, answer the following questions Given the following class definitions: public class Mouse { // more code public class USB_Mouse extends Mouse { // more code public class Wireless_BT_Mouse extends Mouse more code 1.1 What keyword indicates USB_Mouse is a type of Mouse? 1.2 Is a Wireless_BT_Mouse a type of Mouse or a type of USB Mouse? Is Mouse a superclass or a subclass! What is the superclass of USB_Mouse? 1.4 1.5 Suppose the main program instantiates Wireless BT_Mouse like so Wireless BT Mouse MBT = new Wireless_BT_Mouse: If all three classes have no-urg constructors, which constructor is executed first: Wireless_BT_Mouse() or Mouse? Task 2. Polymorphism / instanceOf. (10 points) Write the method whats ThisObject, whats ThisObject accepts a single Object as a parameter, and outputs to the console based on what type of object is passed. Create a main program that tests whatIsThisObject for all the wrapper classes listed below. If a different kind of object is passed, the method should print don't know what kind of object that was to the console. These wranna classes are built inte de alta Dashboard Calendar To-do Notifications

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!