#Directories
1 messages · Page 1 of 1 (latest)
You should create an exercises package in src, and each project should be a package therein.
Or each project is a submodule, but that's a bit harder for you.
so you think you want this: ?
|--Exercises
|--BasicsOfProgramming
|--Classes
|--ClassProject1
|--ClassProject2```
Within a single intellij project, you can make it roughly |--MyIntellijProject |--MyFirstModule |--src |--package1 |--File1.java |--package2 |--File2.java |--File3.java |--MySecondModule |--src |--package1 |--File1.java |--... |--MyThirdModule |--src |--MyFourthModule |--src
if you want to stick to what is more "standard". And without doing some configurations, the modules are fully independent so you wouldnt be able to access code from them. So its an isolated namespace kinda
(ok technically you can create a module in a module but theres no correlation between them in either direction)
@slender meteor
Your question has been closed due to inactivity.
If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.
Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.
When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.
Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.
With enough info, someone knows the answer for sure 👍
you can right click the src folder and say "new package" and name it exercise/exercises, but also I think you'll need to mark src as "sources root"
classes/e1_rectangle/src is marked as a root, but if ur redoing the structure it might not matter
Don't do it. Make each exercise as it's own project module. Here's why. While you can have exercises broken up by package, your build task whether that's the IDE or gradle/maven/ant/whatever is going to want to compile it all. That means you can't leave code in a broken state in one exercise then go to work on another exercise and not have the compiler complain.
It's more verbose to make each exercise or "test an idea" type collection of code as a subproject module but it usually comes with the granularity of being able to run tasks easier.
@slender meteor
Your question has been closed due to inactivity.
If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.
Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.
When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.
Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.
With enough info, someone knows the answer for sure 👍