Answer:
<u>Window.java</u>
- public class Window {
- int width;
- int height;
-
- public Window(int width, int height){
- this.width = width;
- this.height = height;
- }
- public int getWidth(){
- return width;
- }
- public int getHeight(){
- return height;
- }
-
- public int getClientAreaHeight(){
- return getHeight();
- }
- }
<u>Main.java</u>
- public class Main {
- public static void main (String [] args) {
- Window win1 = new Window(12, 15);
- System.out.println(win1.getClientAreaHeight());
- }
- }
Explanation:
<u>Window.java</u>
There is a Window class with two int type attributes, width and height (Line 1 - 3).
The constructor of this class will take two inputs, width and height and set these input to its attributes (Line 5 - 8). There are two methods getWidth and getHeight which will return the value of attributes width and height, respectively (Line 10 - 16).
The required new method getClientAreaHeight is defined in line 18 -20. This method will call the getHeight method to return the height value of the window (Line 19).
<u>Main.java</u>
We test the Window class by creating one Window instance and call the getClientAreaHeight method and print the return output (Line 1 -6).
We shall see 15 is printed.
the answer is true hope it helps
It allows power boats to have stability while cruising. The cathedral hull is like a trimaran in terehat it has one main and two side hulls stuck together so that has a somewhat square to rectangular shape and therefore exhibits greater stability than a single hulled boat. It became more popular with the advent of fibreglass boats in the 1960's and '70s.
Answer:
C. Mean
Explanation:
Mean = (∑
)/N
Median = central values when data is sorted
Mode = most repeated value
Standard deviation = 
In standard deviation, formula you may see that deviation is being calculated from the mean (central location). But here we take square of the value before adding all of them.
But if we just take
, it would be equal to zero.
<u>EXAMPLE</u>
Take 4, 9, 5 as data
mean = (4+9+5)/3 = 18/3 = 6
sum of deviations from mean = (4-6)+(9-6)+(5-6) = (-2)+(3)+(-1) = 0