which of the following is appropriate to fill in ALL of the missing parts of the code snippets?

Refer to the exhibit to answer the question.

Given that the system supports trading Stocks and Bonds, which of the following is appropriate to
fill in ALL of the missing parts of the code snippets?
Position position;
Portfolio aPortfolio; aPortfolio = new Portfolio ( “Fred Mertz” );
______ instrument; instrument = new Stock ( “XXXX” );
aPortfolio.buy ( new Position ( 100, instrument );
instrument = new Bond ( “YYYY” );
aPortfolio.buy ( new Position( 50, instrument );
……
public class Portfolio {
public void buy( int anAmount, _____ anInstrument ) {
……
/}
public void sell(int anAmount, _____ anInstrument ) {
……
/}
/}

Refer to the exhibit to answer the question.

Given that the system supports trading Stocks and Bonds, which of the following is appropriate to
fill in ALL of the missing parts of the code snippets?
Position position;
Portfolio aPortfolio; aPortfolio = new Portfolio ( “Fred Mertz” );
______ instrument; instrument = new Stock ( “XXXX” );
aPortfolio.buy ( new Position ( 100, instrument );
instrument = new Bond ( “YYYY” );
aPortfolio.buy ( new Position( 50, instrument );
……
public class Portfolio {
public void buy( int anAmount, _____ anInstrument ) {
……
/}
public void sell(int anAmount, _____ anInstrument ) {
……
/}
/}

A.
Bond

B.
EquityInstrument

C.
Tradeable

D.
DebtInstrument

E.
Stock



Leave a Reply 0

Your email address will not be published. Required fields are marked *