Relation between RestTemplate and PortFolioManager

I want to implement the Factory class but, I have a question regarding the relationship between RestTemplate and PortFolioManager. I went through the Design Pattern notes on tutorialspoint and was able to understand the logic and use but could not convert the same for PortfolioManagerFactory.

Any push in the right direction will help. Thank you.

go through this, you’ll find everything you need

and after going through that thread, if you have some doubts, let me know…

See this video

If you already know what this is all about. Then just see this image


this will give you a clear view of what needs to be done in this module understand this designing pattern in this module with the help of this diagram.

2 Likes

You just need to pass an instance of RestTemplate to Factory and from factory you need to use that template to initialise an object of Portfolio Manager type and return it.

1 Like

Thank you everyone :slight_smile:

@sukhdeepgill, i still cant understand what to do. Please help

Just see diagram I attached in above comment.
Relation between RestTemplate and PortFolioManager
Try to understand what this diagram sayad how the flow of application works see the arrows where new and implements written.

What you can’t understand specifically? Can you please elaborate on that?