andyagdw / student_management_system

A Java-based application designed to efficiently manage student information
0 stars 0 forks source link

Breaking Functions Up #1

Open bonganibg opened 2 months ago

bonganibg commented 2 months ago

Hey Andy.

I'm having a few internet issues at the moment, so I couldn't install the dependencies and run the application.

The code looks good for a first time Java project, the biggest confusion most people have when moving from Python or JavaScript is working with classes and OOP in general, but you seem to have gotten a hang of it, I can see that you're even using Enums.

For now, I think there are 2 things that would help the readablity of the code.

  1. Instead of having large functions, it would be better to break the code up into functions, so for the switch statements, each case would call a function that would perform the specific operation. This would help readablity quite a lot.
  2. Instead of having the Enums in the class, they can be their own thing, this just makes it easier to access without having to create an instance of a specific class

The most important thing for now is getting that separation of concern within your classes and then we can expand on that a little bit more to reduce the number of files in the controllers directory.

andyagdw commented 2 months ago

Hi Bongani,

Thanks for the feedback! Will make the necessary changes.