Multiple Choice Question

Quiz Guidelines

 

QID: 
71
Tags: 
Question: 

Consider the directory structure shown in Image 1 that displays available folders and classes and the code is given below:

class StockQuote{  
Stock stock;  
public StockQuote(Stock s)  {  }  
public void store() throws IOException{    
return Util.store(stock);  }  
public double computePrice(){    
return Helper.getPricer(stock).price(); 
 } }

Assuming that the code uses valid method calls, what statements MUST be added to the above class?

Select 4 options

A. package com.enthu.rad.*; 
B. import com.enthu.*; 
C. package com.enthu.rad; 
D. import com.*; 
E. import java.io.*; 
F. It is not required to import java.io.* or import java.io.IOException because java.io package is imported automatically. 

Q&A Set: