Question: A Colored Window Class (ColoredWindow) Code the following ColoredWindow subclass of Window: Specification: A ColoredWindow is a Window with a background color accepts a width,

A Colored Window Class (ColoredWindow)

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

************ ************ ************ ************ ************ ************ ************ ************ 

a (static) read method

I've provided an application class, ColoredWindowApp, for testing your class.

Sample Test Run

If the file window.data contains:

4 9 # 

my application class produces the following output:

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

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!