subject
Computers and Technology, 21.06.2021 23:00 Gillo34

Consider the following class definitions. public class Apple

{
public void printColor()
{
System. out. print("Red");
}
}
public class GrannySmith extends Apple
{
public void printColor()
{
System. out. print("Green");
}
}
public class Jonagold extends Apple
{
// no methods defined
}

The following statement appears in a method in another class.
someApple. printColor();
Under which of the following conditions will the statement print "Red" ?
I. When someApple is an object of type Apple
II. When someApple is an object of type GrannySmith
III. When someApple is an object of type Jonagold

a. I only
b. II only
c. I and III only
d. II and III only
e. I, II, and III

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
Which database model is best used for data warehouse and data mining
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
Rachel completed typing an official document with a word processing program. she wants to make sure that her document has no typographical errors. she also wants all headings to have the same font. which features in a word processing program should she use? rachel should use the feature in a word processing program to find typographical errors. she should apply to have uniform headings.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
You know the right answer?
Consider the following class definitions. public class Apple

{
public void printC...
Questions
question
Mathematics, 08.03.2021 07:50
question
Mathematics, 08.03.2021 07:50
question
Geography, 08.03.2021 07:50
question
Mathematics, 08.03.2021 07:50