Having problem understanding todo milestone 1

//Copy your code from Module#3 PortfolioManagerApplication#calculateAnnualizedReturn
// into #calculateAnnualizedReturn function here and make sure that it
// follows the method signature.
The above is mentioned in todo. I want to know wheter it means that calculateAnnualizedReturn function(in portfolioManagerImpl) should match the method signature as in PortfolioManagerApplication#calculateAnnualizedReturn or does it means that calculateAnnualizedReturn function(in portfolioManagerImpl) should match the method signature as in PortfolioManager Interface.

@shubhamjadon99 The PortfolioManagerImpl#calculateAnnualizedReturn should match the signature provided in the interface

2 Likes

Hi @shubhamjadon99,

It basically means that the method signature should match the PortfolioManager Interface.

When it says copy, it means you can use the same code for method (and any associated helper methods, if any) from PortfolioManagerApplication#calculateAnnualizedReturn in PortfolioManagerImpl#calculateAnnualizedReturn.

Let me know if this helps!

2 Likes

first things first,

read the material provided on the milestone taskboard to get an idea of the module and Java interfaces.
next you can just look around in the files that are new.
Then understand that there is an interface provided and an implementation class where you can write your code.

This module is all about “Refactoring” your code into the interface so you just have to implement the logic you built in module 3 into this one.

i will finally give you a big hint as to the order of TODOs to approach the module:
Interface > implementation > factory > main class file

Hope this helps you get started

1 Like