replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
In addition to what the other reviewers have mentioned
- It's always better to restrict your
Console.WriteLine
to yourMain
method. Hence, you wouldn't require a method such asaskForUserOption
to print to the console. LikewiseshowInvalidOptionMessage
- If you ask me
_givenOption
should have been implemented as a property rather than a variable as you use it to get and set the content instartMenuResponsalToOptionGiven
andreadUserOption
methods - I'm afraid this class breaks Single Responsibility of SOLID PRINCIPLE; the class is responsible for reading, writing and handling exceptions
- As @I'll add comments tomorrow @I'll add comments tomorrow indicated the recursion achieved by
methodCaller
can be replaced using awhile..loop
. This will avoidreadUserOption
,checkUserOptionIsBetweenMinAndMaxOptions
andshowInvalidOptionMessage
methods - I hate to be a spoiler ...but I don't see this code as being unit-testable. Almost all the methods are making several method calls. You want to separate printing to the screen and reading from the screen i.e
ShowStartMenu
In addition to what the other reviewers have mentioned
- It's always better to restrict your
Console.WriteLine
to yourMain
method. Hence, you wouldn't require a method such asaskForUserOption
to print to the console. LikewiseshowInvalidOptionMessage
- If you ask me
_givenOption
should have been implemented as a property rather than a variable as you use it to get and set the content instartMenuResponsalToOptionGiven
andreadUserOption
methods - I'm afraid this class breaks Single Responsibility of SOLID PRINCIPLE; the class is responsible for reading, writing and handling exceptions
- As @I'll add comments tomorrow indicated the recursion achieved by
methodCaller
can be replaced using awhile..loop
. This will avoidreadUserOption
,checkUserOptionIsBetweenMinAndMaxOptions
andshowInvalidOptionMessage
methods - I hate to be a spoiler ...but I don't see this code as being unit-testable. Almost all the methods are making several method calls. You want to separate printing to the screen and reading from the screen i.e
ShowStartMenu
In addition to what the other reviewers have mentioned
- It's always better to restrict your
Console.WriteLine
to yourMain
method. Hence, you wouldn't require a method such asaskForUserOption
to print to the console. LikewiseshowInvalidOptionMessage
- If you ask me
_givenOption
should have been implemented as a property rather than a variable as you use it to get and set the content instartMenuResponsalToOptionGiven
andreadUserOption
methods - I'm afraid this class breaks Single Responsibility of SOLID PRINCIPLE; the class is responsible for reading, writing and handling exceptions
- As @I'll add comments tomorrow indicated the recursion achieved by
methodCaller
can be replaced using awhile..loop
. This will avoidreadUserOption
,checkUserOptionIsBetweenMinAndMaxOptions
andshowInvalidOptionMessage
methods - I hate to be a spoiler ...but I don't see this code as being unit-testable. Almost all the methods are making several method calls. You want to separate printing to the screen and reading from the screen i.e
ShowStartMenu
In addition to what the other reviewers have mentioned
- It's always better to restrict your
Console.WriteLine
to yourMain
method. Hence, you wouldn't require a method such asaskForUserOption
to print to the console. LikewiseshowInvalidOptionMessage
- If you ask me
_givenOption
should have been implemented as a property rather than a variable as you use it to get and set the content instartMenuResponsalToOptionGiven
andreadUserOption
methods - I'm afraid this class breaks Single Responsibility of SOLID PRINCIPLE; the class is responsible for reading, writing and handling exceptions
- As @I'll add comments tomorrow indicated the recursion achieved by
methodCaller
can be replaced using awhile..loop
. This will avoidreadUserOption
,checkUserOptionIsBetweenMinAndMaxOptions
andshowInvalidOptionMessage
methods - I hate to be a spoiler ...but I don't see this code as being unit-testable. Almost all the methods are making several method calls. You want to separate printing to the screen and reading from the screen i.e
ShowStartMenu
lang-cs