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 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Many everyday occurrences can be represented as a binary bit. for example, a door is open or closed, the stove is on or off, and the fog is asleep or awake. could relationships be represented as a binary value? give example.
Answers: 1
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
You know the right answer?
Class aggregate" is incorrect. choose the correct line so that this program prints: granite: weig...
Questions
question
Mathematics, 17.08.2021 08:40
question
Biology, 17.08.2021 08:50
question
Mathematics, 17.08.2021 08:50
Questions on the website: 13722360