I am confused in these instruction

Anyone pls give me idea or hint of what we are expected to do here

part -1:
you need to create interface for TiingoService and AlphavantageService(StockQuoteService)
then Create a factory pattern for that Interface (StockQuoteServiceFactory)

Create an Object For StockQuoteService in portfoilomanagerimp with the help of Factory class
so that you can can use the service methods from portofoiloimp

Hope this Helps

bro i am not getting what the instruction in line no 1 want.

create an object of StockQuoteService in portofoilimanagerimpl

yes bro i an done with that but we have to change constructor for impl file that mean we are going to have two constructor?

Hi @sandeep,

You don’t need to modify the constructor. Doing so will break the build. You can add a new constructor for this module.

Hope this helps!

bro i have done something like this
` protected PortfolioManagerImpl(StockQuotesService stockQuotesService) {

this.stockQuotesService = stockQuotesService;


Yeah this should be sufficient. Have confidence and keep proceeding. I am sure you’ll crack the module :slight_smile:

ya bro but what i am not getting now is ingetPortfolioManager(String provider, RestTemplate restTemplate)
how to provide string provider during call in portfoliomanagerapplication.

You don’t need to provide it. Use default arguments if needed. The case for null is also specified. So that’ll cover everything.

1 Like

It has been more than 12 hours since we have got a reply from your side. I am closing this ticket. If the problem persists feel free to raise a new query :slight_smile:

Closing this topic as there is no response since last 12 hours. Please feel free to create a new topic and post this question as a reference link in the description of the new topic.