[toc]
🚧 This isn't complete, but I'll worry about that later.
In this project, you will show that you can:
- Read and understand code written by others.
- Use core Java syntax (methods, variables, loops, conditionals).
- Utilize
ArrayListandHashMapcollection types. - Work with console I/O via the
Scannerclass. - Work with data types and arrays.
Set up a local copy of the project: Visit the repository page for this project and fork the repository to create a copy under your own GitHub account.Open IntelliJ. If IntelliJ is currently open, save your work, close the program, and then reopen it.If the app opens up to an existing project, select IntelliJ > Preferences > Appearance & Behavior > System Settings and uncheck Reopen last project on startup. Close and reopen IntelliJ.From the Welcome to IntelliJ dialog box, select Check out from Version Control > GitHub.Choose your fork from the repository dropdown, select the parent directory where you’d like to store your project, and hit Clone.When asked Would you like to create an IDEA project… select Yes, and then accept all of the default options presented.In the screens that follow, be sure to choose Create Project From Existing Sources on the first pane, and select the default values of all following panes.
Before diving in and starting to code, make sure you understand what the code you’ve been given does. Since you’re starting with a functioning—albeit unfinished—program, go ahead and run it to get an idea of how it works. To do this, right-click on the main method in the TechJobs class and select Run TechJobs.main().
⚠️ WARNING! The application will run until you force it to quit, re-prompting time after time. To kill it, press the red “stop” icon in the Run pane. We’ll learn precisely how the program manages to work this way below.
Let’s explore the code by starting with the source of the data our program is providing access to.
classDiagram
class TechJobs {
-$in : Scanner
+$main(String[] args) : void
-$getUserSelection(String menuHeader, HashMap<String,String> choices) : String
-$printJobs(ArrayList<HashMap<String,String>> someJobs) : void
}
classDiagram
class JobData {
-$DATA_FILE : String = "resources/job_data.csv"
-$isDataLoaded : Boolean = false
-$allJobs : ArrayList<HashMap<String, String>>
+$findAll(String field) : ArrayList<String>
+$findAll() : ArrayList<HashMap<String, String>>
+$findByColumnAndValue(String column, String value) : ArrayList<HashMap<String, String>>
-$loadData() : void
}
#Java #Assignments