Ask Question
11 May, 12:18

Assume the existence of an abstract class named DesktopComponent with the following: a void (abstract) method, o nclicked, that accepts no parameters. a (private) string named type, describing the sort of Desktop component (e. g. window, icon, taskbar, etc). a constructor accepting a string that is used to initialize the type instance variable Write the definition of a subclass, named Window with the following: A. a constructor that invokes the DesktopComponent constructor passing it that value "Window" for the type. B. an o nclicked method that prints out the message "Window selected" to System. out

+3
Answers (1)
  1. 11 May, 15:47
    0
    public class Window extends DesktopComponent {

    public Window () {super ("Window"); }

    public void o nclicked () {System. out. println ("Window selected"); }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume the existence of an abstract class named DesktopComponent with the following: a void (abstract) method, o nclicked, that ...” in 📙 Physics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers