For this assignment, students are asked to refactor a version of the TechJobs Console assignment to make the code object-oriented and to add some unit testing.
Assignment Requirements:
- Review Sally’s code in the Employer class to learn how to assign a unique ID.
- Add getters, setters, and custom methods as needed to the Location, CoreCompetency, and PositionType classes.
- Complete the Job class using what you learned in steps 1 and 2.
- Use unit testing to verify the constructors and equals methods for the Job class.
- Use TDD to design and code a custom toString method for the Job class.
- Use inheritance to DRY the code within Employer, Location, CoreCompetency, and PositionType
The starter code contains 6 unit test classes. Each class contains tests for each main task of the assignment. This allows students to run tests upon completion of a task before moving on to the next one.
TestTaskTwo
verifies that students completed theLocation
,CoreCompetency
, andPositionType
classes.TestTaskThree
verifies that students created thejobClass
and that it uses the other classes correctly to createjob
objects.TestTaskFour
verifies students' unit tests exist within the application.TestTaskFive
tests the unit tests the students created for their customToString
method.TestTaskSix
verifies that students used proper inheritance betweenLocation
,Employer
,CoreCompetency
,PositionType
andJobField
. For example,Employer
should extendJobField
. These tests focus on the existance of the extension rather than the behavior of the extension.AbstractTest
verifies the behavior of the DRY code.
As you work on the components of the given tasks, continually re-run the tests to see the failing tests gradually turn to passing. When all tests within the file pass, you’re ready to move onto the next task.
Once you have completed the assignment, please follow the submission instructions at the bottom of this ReadMe.md
Expected output from hardcoded job data:
ID: 1
Name: Product tester
Employer: ACME
Location: Desert
Position Type: Quality control
Core Competency: Persistence
ID: 2
Name: Web Developer
Employer: LaunchCode
Location: St. Louis
Position Type: Front-end developer
Core Competency: JavaScript
ID: 3
Name: Ice cream tester
Employer: Data not available
Location: Home
Position Type: UX
Core Competency: Tasting ability
To submit your work please follow the Submission Instructions.