PrepAway - Latest Free Exam Questions & Answers

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 ) {
……
/}
/}

PrepAway - Latest Free Exam Questions & Answers

A.
Bond

B.
EquityInstrument

C.
Tradeable

D.
DebtInstrument

E.
Stock


Leave a Reply