r/javahelp • • Jun 17 '24

Java

Hello everyone, I'm new to Java. I would like to improve my analysis and design skills. I've recently started creating my own projects. Recently, I wrote a Battleship game. https://github.com/LetMeDiie/Battleship. I would like to know from you how poorly structured my architecture is. I've added comments to all classes and included a README folder, although it was supposed to describe the application architecture, but I didn't quite finish it.

0 Upvotes

8 comments sorted by

View all comments

3

u/Dense_Age_1795 Jun 17 '24

the only error that i saw in your code is to not add a base package, for the rest is pretty nice, the only thing that i miss is some unit tests

1

u/Interesting-Hat-7570 Jun 17 '24

Thank you for your time. I'm glad to hear something good about my code. Yes, sorry, I haven't learned how to test yet. I'll add it when I learn. Could you clarify what a base package is? It's the first time I've heard of it.

1

u/Dense_Age_1795 Jun 17 '24

basically a group of directories that define the classpath, this is done for avoiding name collision, this is really simple just create some directories inside your src directory like com/username/projectname and then move all your packages to that directory, intellij will do the refactor for you

1

u/Interesting-Hat-7570 Jun 18 '24

Thanks again for your advice.

I will take note of this and hopefully apply it in the future.