Question
Code the following ColoredWindow subclass of Window: Specification: A ColoredWindow is a Window with a background color accepts a width, height, and background color(in the
Code the following ColoredWindow subclass of Window: Specification: A ColoredWindow is a Window with a background color accepts a width, height, and background color(in the form of a character); omitting the color defaults to '.' (i.e., you should have a second overloaded constructor) a toString that returns the width, height and color of the window (see Sample Run) methods getColor and setColor displayNormal fills the window with the color ************ ************ ************ ************ ************ ************ ************ ************ This method implements the corresponding abstract method of the Window superclass It must be declared public as methods declared in an interface default to public. a (static) read method The name of your class should be ColoredWindow. Your class is tested by a ColoredWindowApp class. No auxiliary minimal class is required, since ColoredWindow is a 'concrete' class, and objects of its type may be created. This is for informational purposes only and does not affect your coding of the Window class. The only thing you should be submitting is the code for ColoredWindow. For example, if the file window.data contains: 4 9 # the expected output of the ColoredWindowApp application is: Creating a 5x10 colored window Displaying: (Nothing to see here) Setting visible to true and displaying: +++++ +++++ +++++ +++++ +++++ +++++ +++++ +++++ +++++ +++++ Minimizing and displaying: [a 5x10 window with background color '+' (minimized)] Restoring and displaying: +++++ +++++ +++++ +++++ +++++ +++++ +++++ +++++ +++++ +++++ Changing color to '%' and displaying: %%%%% %%%%% %%%%% %%%%% %%%%% %%%%% %%%%% %%%%% %%%%% %%%%% Resizing to 10x5 and displaying: %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% %%%%%%%%%% Minimizing and displaying: [a 10x5 window with background color '%' (minimized)] Creating a window from file data and displaying (Nothing to see here) Setting visible to true and displaying: Minimizing and displaying: [a 4x9 window with background color '#' (minimized)]
Step 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