Answer:
int x = 10;
Explanation:
This would work in many languages (C/C++/C#/Java).
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.
a <span>Ethernet-<span>Cable is a how to put it together</span></span>
<span><span /></span>
Answer:
<u>First generation are</u>
a)they are unreliable
b)they are very costly and
c)huge in size
<u>Second generation are</u>
a)they use a transistor
b)smaller in size compared to first generation
c)they are faster than the first generation
<u>Third generation are </u>
a)its more reliable than the first generation and the second generation
b)faster than first generation and the second generation
c)consume less electricity
<u>Fourth generation are</u>
a) they are very cheap
b)they are very small in size
c)they are portable and reliable
Explanation:
explanation is in the answer