Examlex

Solved

"Class Aggregate" Is Incorrect

question 54

Multiple Choice

"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( ) ;
}
}


Definitions:

Santa Maria Antiqua

Santa Maria Antiqua is an early Christian church located in the Roman Forum, notable for its significant collection of Byzantine art and frescoes from the 6th to 9th centuries.

Serpent in Eden

Symbolizes temptation and the fall of man in the biblical story of Adam and Eve in the Garden of Eden, where the serpent persuades Eve to eat the forbidden fruit.

Salvation of Jonah

A biblical story from the Book of Jonah, often depicted in art, about Jonah being saved by God from drowning by being swallowed by a large fish.

Dura-Europos

An ancient city on the Euphrates River, known for its well-preserved multicultural artifacts and buildings, including a synagogue and early Christian chapel.

Related Questions