Here's a video with a full walk-through of my solution for the last assignment:

Assignment 2 – People, Employees and Organizations

Click Here to View Practice Assignment 2 on GitHub

Or you can clone this repository with this GitHub URI in your IDE:

My goal for this assignment is to get you familiar with inheritance and the importance of dealing with the public methods available in the Java Object class. In practice assignment 2, you'll learn how to use both an interface and an abstract class.

Important Notes:

  1. I've included two library files (JAR files) in the source code of this assignment. You still need to add them to the classpath when you extract this assignment and begin working on it. To do this, just right click on the Project and select Properties, then Java Build Path, then “Add JARs”, and navigate to the “src/lib” directory to add both JAR files.
  2. As with the first assignment there are Tests available that must pass. Currently they should all fail AND they will have compilation errors. The compilation errors are expected, as you'll need to implement the appropriate methods from the interface and abstract classes (and then some). Once you've successfully coded the assignment, you won't have any compilation errors and all the tests will pass. To run the tests, just right click on the “Tests” class name and select “Run As->JUnit test”.

Assignment Requirements

Okay so here's the breakdown of the requirements for this assignment. You will need to develop a system that can track employee information for two Organizations (Google and Microsoft). The Employee information you must track is as follows:

  • Name
  • Sex
  • Job Title
  • Organization they work for
  • Birthday

As for the Organization that the Employee works for, you must also track this information:

  • Organization Name
  • Number of Employees

The system must be able to properly compare any two employees against each other to determine if they are the same Person. This means that if you compared two People with the same Name, Sex, Birthday and Organization, the system should think that they are equals to one another. If any of these properties are different, then the two People are not the same Person.

The same rules apply to comparing Organizations to one another. Organizations with the same Organization name are to be thought of as equal, different names means different organizations.

Free Java Roadmap

Discover exactly what you need to learn and where to start in order to become a professional coder.