Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, fnaflover8505
Businesses allocate resources for their best and most productive uses. the more a resource, the more costly it will be. a manufacturer that requires scarce and costly resources is likely to charge for its products.
Answers: 2
image
Computers and Technology, 24.06.2019 06:30, chloeholt123
For which utilities, if any, does the landlord pay?
Answers: 2
image
Computers and Technology, 25.06.2019 00:30, kukisbae
How do i take a screenshot on a laptop?
Answers: 2
image
Computers and Technology, 25.06.2019 21:00, jatavispillow
An in active student wants to become more physically active but does not want the money to pay for gym membership what is the most effective think she can do to develop realistic fitness routine
Answers: 2
Do you know the correct answer?
Class aggregate" is incorrect. choose the correct line so that this program prints: granite: weig...

Questions in other subjects:

Konu
English, 27.08.2019 08:30
Konu
Mathematics, 27.08.2019 08:30
Konu
History, 27.08.2019 08:30