In this code review, I have summarised the overall code and then covered each file to provide constructive feedback by covering what has been implemented well, addressing any issues and suggesting what could be improved.
Overall
Good Points
The code loads and runs correctly without errors. Both Option 1 and Option 2 have been implemented in line with the brief (2:1 checklist)
A long words file is generated (2:1 checklist)
Comments throughout the code are clear and thorough
The classes and methods have been used from the base code and some additional classes/methods have been implemented (2:1 checklist)
Exceptions are handled well in Start.cs (2:2 checklist). There are more opportunities to add in exception handling such as
Issues
None
Suggestions for improvement
Start.cs
Good Points
Comments throughout the code are clear
Variable names follow camel case convention
This custom class has been used in addition to the ones provided with the base code
The class uses exception handling to prevent errors if the incorrect input is entered by the user
Issues
None
Suggestions for improvement
Line 16 - 19 use Console.WriteLine("");, this could be cleaned up by using Console.WriteLine("\n") as used on line 18. A similar change could be implemented on lines 26 - 27
An additional custom class could have been created to handle the input exception that could be used at multiple points in the code
Program.cs
Good Points
Comments throughout the code are clear
Variable names follow camel case convention
Additional methods have been added
Good logic and structure, it is easy to understand
Issues
None
Suggestions for improvement
On line 13 a variable for a bool is declared however, this could be removed due to the while loop being set to true by default and using break; at the end of the while loop
Lines 43 and 79 use an "if statement" to manage the user input, an alternative implementation could use a "switch" and "case" statement to manage this. Lines 28 and 33, which also contain an if statement to end the program could also be handled here
Lines 86 - 91 use multiple Console.WriteLine(""); commands, these could be condensed into one
Input.cs
Good Points
Comments throughout the code are clear
Variable names follow camel case convention
Good logic and structure, it is easy to understand
Issues
None
Suggestions for improvement
None
Analyse.cs
Good Points
Comments are clear and thorough
Variable names follow camel case convention
Implemented additional methods (2:2 checklist)
Exceptions handled well
Variable names follow camel case convention
Solid logic and structure, easy to understand
Issues
None
Suggestions for improvement
None
Report.cs
Good Points
Clear and concise throughout
Issues
No issues
Suggestions for improvement
None
Summary
A good implementation overall. All features described in the brief have been implemented successfully and the results generated are correct. During testing user input was handled correctly, there are opportunities throughout to add in further exception handling however.
Thank you for all the Feedback, I have ensured that all my inputs have exception handling and I changed my while loop to be while true instead of using a variable .
Code Review (Michael Lowen 12294679)
In this code review, I have summarised the overall code and then covered each file to provide constructive feedback by covering what has been implemented well, addressing any issues and suggesting what could be improved.
Overall
Good Points
Start.cs
(2:2 checklist). There are more opportunities to add in exception handling such asIssues
Suggestions for improvement
Start.cs
Good Points
Issues
Suggestions for improvement
Console.WriteLine("");
, this could be cleaned up by usingConsole.WriteLine("\n")
as used on line 18. A similar change could be implemented on lines 26 - 27Program.cs
Good Points
Issues
Suggestions for improvement
bool
is declared however, this could be removed due to the while loop being set to true by default and usingbreak;
at the end of the while loopConsole.WriteLine("");
commands, these could be condensed into oneInput.cs
Good Points
Issues
Suggestions for improvement
Analyse.cs
Good Points
Issues
Suggestions for improvement
Report.cs
Good Points
Issues
Suggestions for improvement
Summary
A good implementation overall. All features described in the brief have been implemented successfully and the results generated are correct. During testing user input was handled correctly, there are opportunities throughout to add in further exception handling however.