Due Date: 09/19/2014 Friday 11:59PM
Database is an organized collection of data. In this assignment, you will implement a simple database that permeanntly stores student information. That means you will have to store the student information to a file so that you can still find your data after you restart your computer.
We can still hold all student information in a Sorted Bag. When we open a database, we read the student records into a bag. We manipulate the Bag to insert, and remove student records. When we close the database, we write the Bag into the database file in JSON (JavaScript Object Notation) format. You can learn more about JSON here. You can verify the content of the file at http://jsonlint.com/ . You need to add json-simple-1.1.1.jar to parse the JSON. Add the JAR file to your project.
NetBeans Project: You can download the NetBeans Project here.
Here are the database operations that your program must support in order to manipulate the contents of the database.
You have to implement this Database Interface. Don't worry. I implemented create, open, close metods. You have to implement get, remove, find and insert methods. Database Implementation is here.
Student class has id, first name, last name and date of birth. You can add phone number and email. Student class is given here. Student class uses the Date class we created. You can download the Date class here.
Your main program display the following menu:
Welcome to Student Database
0) Quit the program |
The main menu class is given here. The InputHelper class is used in to receive user inputs. You can find it here.
Make sure you test following requirements:
Array based collection, Iterator, Comparable, Keyboard input, File I/O, JSON