From faae70f1fa7221b76ad701e74a345443d9603207 Mon Sep 17 00:00:00 2001 From: snowy988 Date: Wed, 30 Jul 2025 05:11:10 +0100 Subject: [PATCH 1/2] Create Code_Review.txt --- Code_Review.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Code_Review.txt diff --git a/Code_Review.txt b/Code_Review.txt new file mode 100644 index 0000000..388c5dd --- /dev/null +++ b/Code_Review.txt @@ -0,0 +1,5 @@ +1) Naming +- variable names are too short and are unclear z,q,a,s,t,w,e + +Suggestions: +- Rename z to filePath, q to lines, a to wordCounts, s to cleanedLine, t to words, w to word, e to entry From 5e35fc6b7db37e30bfa21806799f498c31e06da4 Mon Sep 17 00:00:00 2001 From: snowy988 Date: Wed, 30 Jul 2025 05:49:24 +0100 Subject: [PATCH 2/2] Update Code_Review.txt --- Code_Review.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Code_Review.txt b/Code_Review.txt index 388c5dd..849b38b 100644 --- a/Code_Review.txt +++ b/Code_Review.txt @@ -1,5 +1,50 @@ + 1) Naming - variable names are too short and are unclear z,q,a,s,t,w,e Suggestions: - Rename z to filePath, q to lines, a to wordCounts, s to cleanedLine, t to words, w to word, e to entry + +2) Code Structure +- Entire program is inside the Main() method + +Suggestions: +- Break the coding into separate sections to make the code easier to read, test and reuse + +3) Error handling +- There's no error handling +-Program crashes if file is unreadable or file path incorrect +- No validation for user input + +Suggestions: +-Give user clear error messages +-Use try-catch block to handle errors +-check if file exists before attampting to read + +4) File assumptions +-The program assumes the file - exists, is readable and is plain text + + Suggestions: +- Validate file format +- Add to handle empty/unreadable files + +5) OOP Principles +- Program is fully procedural +- no clases, methods or encapsulation + +Suggestion: +- Create clases and methods + +6) Output +- technichelly correct but not well designed +- uniquez is not clear + +Suggestion: +- change unique to unique words +- add better output formatting + +7) Program Logic +- Core logic correct + +Suggestion: +- Split code into smaller methods