Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of the Program (Yes, again...) because of Code Smells #319

Open
EmilioSG23 opened this issue Aug 13, 2022 · 0 comments
Open

Comments

@EmilioSG23
Copy link

Hello, I'm doing a work about Code Smells and I see your repository again for it.
In addition to the previously reported, I see that your code in some parts isn't easy to maintain.
So how the previous report, I'll give you some advises to solve it.
First, I identified the following code smells: Switch Statement, Feature Envy, Comments.
Each smell can be refactorized with this techniques:
Switch Statement: You use Type Code in Account class and don't use polimorfism. I suggest use Replace Type Code with Subclass and Replace Conditional with Polymorphism.
Feature Envy: Customer class have a method that only use fields from Account class. Move method to Account class.
Comments: You use in some parts of the program comments. It isn't bad, but I suggested that don't use it for explain a part of the code. You can use Rename Method techniques, it'll be better for the performance of the program.
I hope to help with it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant