My opinion is the answers A and D. I would choose A if you can only choose one, though.
Explanation:
public class Int_List
{
protected int[] list;
protected int numEle = 0;
public Int_List( int size )
{
list = new int[size];
public void add( int value )
{
if ( numEle == list.length )
{
System.out.println( "List is full" );
}
else
{
list[numEle] = value;
numEle++;
}
}
public String toString()
{
String returnStr = "";
for ( int x = 0; x < numEle; x++ )
{
returnStr += x + ": " + list[x] + "\n";
}
return returnStr;
}
}
public class Run_List_Test
{
public static void main( String[] args )
{
Int_List myList = new Int_List( 7 );
myList.add( 102 );
myList.add( 51 );
myList.add( 202 );
myList.add( 27 );
System.out.println( myList );
}
}
Note: Use appropriate keyword when you override "tostring" method
Answer:
C. Rulers indicate the margins, tabs, and indents in a presentation slide.
Explanation:
Answer:
(a) 1 to 8
(b) 1 to 6
Explanation:
A "leaf" is a node at the end of a binary tree (in other words, it has no "children"). All other nodes are "non-leaf" nodes.
The smallest number of leaves is 1. That would be a binary tree that's just a straight line; each node will have only 1 child, until you get to the last node (the leaf).
To find the largest number of leaves, we start drawing a full binary tree. A complete tree with 15 nodes has 7 non-leaf nodes and 8 leaf nodes. A full tree with 6 non-leaf nodes can have up to 6 leaf nodes.