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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Jessie has received a contract to build a real-time application for a baker. however, the baker doesn't want to invest too much money. his only requirement is that he wants the customers to know which cupcakes are available at what time and in what quantity. so his core requirement is that the details of product should be in real time. what platform can jessie use to develop this application?
Answers: 1
question
Computers and Technology, 23.06.2019 11:50
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
Answers: 1
You know the right answer?
Class aggregate" is incorrect. choose the correct line so that this program prints: granite: weig...
Questions
Questions on the website: 13722362