1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Solnce55 [7]
3 years ago
7

Assume the existence of a Window class with a constructor that accepts two integer parameters containing the width and height of

the window (in that order). Assume a subclass TitledWindow has been defined that has two instance variables: a string named text for the text of the title and, an integer, titleBarHeight for the height of the title bar. Write a constructor for TitledWindow that accepts four parameters: two integers containing the width and height (which are passed up to the Window constructor), and, a string and integer which are used to initialize the TitledWindow instance variables. The height of the title bar should be 'clamped' by the constructor to one half the height of the window-- i.e., if the height of the title bar passed into the constructor is greater than one half the specified height of the window, it should be set to one half the height of the window.
Computers and Technology
1 answer:
zysi [14]3 years ago
8 0

Answer:

The answer to the following question:  

TitledWindow(int titleBarHeight, int height, int width, String text)  //define subclass and pass an argument of four variable  

{

//define constructor and pass an argument of two variable

super(height, width);  

this.text = text;  

//set if condition

if (titleBarHeight > height / 2)  

titleBarHeight = height / 2;  

this.titleBarHeight = titleBarHeight;

}

Explanation:

Here, we have define a subclass of the "Window" class i.e., "TitledWindow" and pass four variable in the argument.

Then, define constructor and pass two variable in the argument.

Then, set if condition and pass the condition "titleBarHeight > height / 2".

You might be interested in
This loop is a good choice when you know how many times you want the loop to iterate in advance of entering the loop.1. do-while
Luba_88 [7]

Answer:

Option 3 is the correct answer.

Explanation:

  • In c, c++ or Java programming language, The for loop takes three parameters in which first is an initialization, second is condition check and the third is an increment. None of the other loop (except for loop) takes three parameters. The other loop takes only one parameter and that is the condition check.
  • So when a user knows about the times of iteration then it is a good choice to use the for loop but when the person does not know about the times of iteration if the loop. It means the iteration of the loop is based on the condition then it is a good choice to chose while or Do-while loop.
  • The above question wants to ask which loop for a user can best if he familiar with the iteration of the loop then the answer is for loop which is started from option 3. Hence Option 3 is the correct answer while the other is not because--
  1. Option 1 states about the do-while loop which takes condition only.
  2. Option 2 states about the while loop which also takes condition only.
  3. Option 4 states about the infinite loop which is not any loop.
  4. Option 5 states about none of these which is not correct because option 3 is the correct answer.

6 0
3 years ago
Kieran wants to search a database quickly for information on the last time a patient came to his medical facility. This informat
SpyIntel [72]
B I think is what it is
7 0
3 years ago
Read 2 more answers
What were the important developments that occurred in photography that facilitated the creation of motion pictures? Two critical
8_murik_8 [283]

Answer:

"A moving picture is an illusion that makes a still photo seem to move. The basic principal behind motion pictures is the fast transition between one picture to the next, almost creating a seamless transition. A flip-book is a good example of this. Another example would be film used for old movies. The film contains negatives of an image which when light is shined through creates a "shadow" of the image. If you quickly transition the film from one image to the next you end up a motion picture."

Explanation:

7 0
2 years ago
The Leal button is located in the
Fed [463]
The button is located on the left side of the gear shift right under the main shift button
7 0
2 years ago
An online retailer is looking to implement an enterprise platform. Which component of the enterprise platform will help the comp
adelina 88 [10]

Answer: Data and Insights

Explanation:

Data and Insights in an enterprise platform is very important as it helps users better understand their customers so that they may be able to offer them the best services.

Data allows the platform to capture the data of the customer and insights then curates and consumes the data for analysis. The result of this analysis will enable the company to better understand the customer so that they might be able to offer preferable products.

3 0
2 years ago
Other questions:
  • Again, consider what you believe to be the goal of performing a penetration test. Why would you worry about doing any privilege
    14·1 answer
  • What does the "configure dhcp options for proxy dhcp" option do?
    13·1 answer
  • A JOB LEADS SOURCE LIST is used to help record all of the job leads you can find. It includes contact information and a plan for
    8·1 answer
  • Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the pop
    9·1 answer
  • For a line segment, show that clipping against the top of the clipping rectangle can be done independently of the clipping again
    7·1 answer
  • Which of the following is the fastest way to open an Access database? a. Right-click the database icon. b. Start Access from the
    13·2 answers
  • Technology has proliferated in Kenya and Somaliland, with text messages used to replace cash, creating mobile money use that, on
    11·1 answer
  • True or False: <br> The object reference can be used to polymorphically store any class in Java.
    13·1 answer
  • Which function in Excel tells how many
    6·1 answer
  • Question 5 / 15
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!