Ah! I see, now got thatStephan van Hulst wrote:The problem here is that you're not using Maven to build your project. Eclipse IDE for Java Developers comes with native Maven support.
Seems I did as you suggested.Delete the projects from your workspace and also delete the .settings/ folder and the .classpath and .project files. In the "File" menu of Eclipse, select "Open Projects from File System...". Eclipse will automatically detect that Blackjack and the core module are Maven projects.
Now things are getting clear about Maven and JUnit ( not thoroughly but at least got what they are about ) writing simple classes using Maven and testing them using JUnit locally. Very soon will add a Player class in core/main... module, hopefully with test class of It as well in test/....Move your classes to the appropriate packages in the core/src/main/java folder. Instead of writing main() methods to test your code, write test cases inside the core/src/test/java folder. You can execute your test cases by running the "Coverage" action in Eclipse on the core module.
Added a module cli ( having core as parent ), appears added correctly.If you want to add a user interface, add a new module to the project. The "core" module is for the basic game logic of blackjack. I suggest you add a new module named "cli" where you can add classes for interacting with the console.
I think I created separate module cli correctly? but the POM file of core module showing an error "failed to read artifact descriptor for org.hamcrest:hamcrest-library.jar:1.3"Stephan van Hulst wrote:You created your "cli" module inside of the "core" module. The "src" folder that you can't create new classes in is actually the source folder for the "core" module.
I solved this by creating a System variable named M2_HOME and Its value is the location of Maven folder i.e. on my system It's C:\Program Files\Apache Software Foundation\apache-maven-3.5.4 and then in System variables appended the path of maven bin folder to PATH variables value i.e. %M2_HOME%\bin;Ganesh Patekar wrote:but the POM file of core module showing an error "failed to read artifact descriptor for org.hamcrest:hamcrest-library.jar:1.3"
Ganesh Patekar wrote:By the way I'm wondering how members of a project team communicate how many classes Or objects going to be there in the project? I mean not just about objects Or classes but the flow of project, methods etc. not sure I'm able to convey what I meant. How they coordinate because everyone things differently?
I think there is Player class which will have sub classes Dealer and RegularPlayer ( You can suggest good meaning full name for this) but I couldn't find more common fields Or methods (at least by now) of Dealer and RegularPlayer to be declare Or defined in Player class so they will be inherited by both sub classes. Do you still think we suppose to create a Player class having Dealer and RegularPlayer as sub classes?