subject

"class aggregate" is incorrect. choose the correct line so that this program prints:

granite: weight=25.0 value=4 numkind=7
public class inherit
{
abstract class stone
{
protected float weight = 13;
protected int value = 4;
abstract public string tostring( );
}
class aggregate
{
protected int numkind;
}
class granite extends aggregate
{
granite( )
{
weight = 25; numkind = 7;
}
public string tostring( )
{
return "granite: weight="
+ weight + " value="
+ value + " numkind="
+ numkind;
}
}
inherit( )
{
granite g = new granite( );
system. out. println(g);
}
public static void main(string[ ] args)
{
new inherit( );
}
}
a) abstract class aggregate {
b) abstract class aggregate extends granite {
c) abstract class aggregate extends stone {
d) class aggregate extends stone {
e) none of the above

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Create a word problem that involves calculating the volume and surface area of a three-dimensional object. cube: surface area 6 s2 , volume s3
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
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
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
You know the right answer?
"class aggregate" is incorrect. choose the correct line so that this program prints:

gr...
Questions
question
Mathematics, 27.08.2021 17:50
question
Mathematics, 27.08.2021 17:50
question
English, 27.08.2021 17:50
question
Mathematics, 27.08.2021 17:50
question
Mathematics, 27.08.2021 17:50
question
English, 27.08.2021 17:50
question
Mathematics, 27.08.2021 17:50
question
History, 27.08.2021 17:50
question
Arts, 27.08.2021 17:50
Questions on the website: 13722361