Write the class definition for the subclass of class Window named TiteldWindow. A title window is a window with a title bar. TitledWindow maintains the text appearing on the title bar (string) in a variable named text and the height of the title bar (int) in a variable named barHeight. The constructor for TitledWindow accepts (in the following order): a width and height, that are passed up to the Window superclass, and a title text and bar height, that are used to initialize its own instance variables.

Respuesta :

Explanation:

Window Clase

Definition

Namespace:

System.Windows

Assembly:

PresentationFramework.dll

Lets you create, configure, display, and manage the duration of windows and dialog boxes.

Herencia

-Object

-DispatcherObject

-DependencyObject

-Visual

-UIElement

-FrameworkElement

-Control

-ContentControl

-Window

Derivado

-System.Windows.Controls.Ribbon.RibbonWindow

-System.Windows.Navigation.NavigationWindow

Atributos

-LocalizabilityAttribute

Answer:

public class TitledWindow extends Window {

  String text;

  private int barHeight;

  public TitledWindow(int width, int height, String text, int barHeight) {

     super(width, height);

     this.text=text;

     this.barHeight=barHeight;

  }

}

Explanation:

* The solution is written in Java.

- Create a class TitledWindow, since it is a subclass of the Window class, we need to use extends keyword

- Declare the variables, text and barHeight

- Create the constructor with its parameters, since width and height variables are passed from Window class, we can use the super keyword to set the values