Project 3 - A Job Posting Database
Due - Monday, November 13, 2006
The goal of this project is to give you experience with
object-oriented design and inheritance. In this project, you will
write a job posting database. Your database will maintain a
listing of job posting records and will allow the following
operations:
- Add a new posting -- The user must be able to add a new job posting to the database.
- Remove a posting -- The user must be able to remove an existing posting from the database.
- View all postings sorted by employer -- The user must be able to view all of the postings in the database sorted by the name of the employer.
- View all postings for a particular job type -- The user must be able to view all postings for a particular type of job.
- Save database to file -- The user must be able to save all information stored in the database to a file.
Implementation Requirements and Hints
- You must implement a JobPosting base class that can store and
provide access to information about a generic job posting. This
information should include (at minimum), the employer, the salary,
and a job description. This class must be an abstract class. You
must also implement a JobPostingDB class.
- Your JobPostingDB class must have two constructors. One
constructor will create an empty database and the other will
create a database from a file. This second constructor should
take as input the name of the file where the data is stored.
Hint: you will need to think carefully about how you save the data
to a file such that you can use it later to initialize your
database.
- You must also implement three derived classes, each to
represent a different type of job posting: Clerical, Technical,
and Managerial. Each subclass must store and provide access to
position-specific information. In particular, the Managerial class
must store information about the amount of travel expected, the
Technical class should store information about technical skills
required, and the Clerical class should store information about
clerical skills required. You may choose to expand each of these
classes to provide additional information as well. Each subclass
must also implement its own print/toString method that will display
all of the relevant information for a posting of that particular
type.
- As you add new postings, make sure to create the appropriate
type of subclass (Clerical, Technical, or Managerial). The design
of the user interface is up to you. However, think carefully about
how the user will specify which job posting she wishes to remove
if she chooses the remove option. Finally, think carefully about
how you will determine the type of a particular job -- hint, think
about casting.
Due 9:40AM, Monday November 13, 2006
- Complete and submit your working code. Turn in a hard copy in class and place a copy of your .java files in /home/submit/cs112/username.
- Make sure that each function is well documented. Your documentation should specify the type and function of the input parameters and output.
- Run your program on a variety of inputs ensuring that all error conditions are handled correctly.
Note: No portion of your code may be copied from any other
source including another text book, a web page, or another
student (current or former). You must provide citations for any
sources you have used in designing and implementing your program.
Sami Rollins