Answer:
2. <em>A reference of type A can be treated as a reference of type B</em> - False
Base class or its objects are not related to their derived class (or its objects).
Explanation:
class A {
int a;
public A() {
a = 7;
}
}
class B extends A {
int b;
public B() {
b = 8;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
1. <em>After the constructor for class B executes, the variable a will have the value 7 </em>- True.
When an object of a derived class is declared, the constructor of base class is called before the constructor of derived class (is called).
3. <em>Both variables a and b are instance variables </em>- True.
Classes can have instance, or member, variables and methods.
4.<em> After the constructor for class B executes, the variable b will have the value 8</em> - True.
When object of class B is declared, its constructor was called, which initialized variable b to 8.
<u>Answer:</u>
<em>Black and white</em>:
It has only two values namely black or white. The white colour in the image will be represented as “white” and other colour part will be displayed as black.
<em>Grey-scale: </em>
Again the white part does not have a change, the black and other coloured items will be displayed in grey.
<em>Coloured image: </em>
It would display the actual colour of the image. The number of colours and shades depends on the original image from where actually it has been shooted and it also depends on the quality of the camera.
Answer:
Each pixel in an image is made up of binary numbers. If we say that 1 is black (or on) and 0 is white (or off), then a simple black and white picture can be created using binary. To create the picture, a grid can be set out and the squares coloured (1 – black and 0 – white).
Answer: like the monitor or the keyboard
Explanation: it is true i even looked it up and it was true