Ask Question
11 April, 21:13

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

+4
Answers (1)
  1. 11 April, 21:43
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers