Java:Assignment - Address book - Examination

From Juneday education
Jump to: navigation, search

Requirements for passing the exam

Functional requirements

The two required functions of the SimpleAddressBook class accessible via the text based menu are

  1. Listing the current address book contacts
  2. Adding a new Contact to the address book

The listing functionality is already implemented in the source code provided, so the student must implement the add() method in the source code for SimpleAddressBook.

The SimpleAddressBook class has a load() and a save() method already implemented, using a file in the user’s home directory.

The application must have a text-based menu system presenting two options for the list and add functions. The student should call load() on the SimpleAddressBook in the constructor for SimpleApplication, so that (if the file exists) the address book file is loaded on application startup. Likewise, the save() method should be called on the SimpleAddressBook in the MenuAction for adding a contact, so that added contacts are immediately saved in the file.

This leads to a functional requirement of persistence between runs of the application. Any new Contacts added in one run, should be present on application start up of a subsequent run.

Needless to say, all submitted code should compile.

Finally, the code should pass the tests provided with the source code.

For a pass grade, all functional requirements must be satisfied.

Don't send in code which includes the non-mandatory tasks. The optional tasks should be done after sending in the working code for the mandatory tasks and requirements.

Code and style requirements

All code written by the student should be indented in a style consistent with the provided code.

The directory structure with a division between source code in the src branch and class files in the bin branch should be followed.

The naming of the classes which the students write from scratch must follow the instructions, so that the teachers can compile and run the application:

$ java -cp bin/ org.addressbook.main.SimpleMain

The above should launch the application and display the menu.

You should send in the zip file generated by the script below.

Verification script for the entire application

Address book - 06 - Verifying your app

Before handing in your solution (if this is requested) you should verify that the application is working by using our script (verify-app.sh).

Note: this script may have to be downloaded separately (it is not included in the zip file for this assignment). verify-app.sh

This script does a lot of things:

  • adds a couple of contacts to your addressbook
  • verifies that the contacts actually were added
  • collects information about your system
  • creates a zip file that you can hand in (if his is requested)

If you would like to add more than the default 10 contacts or tweak the script you can see what features it has by typing:

$ ./verify-app.sh --help

Problems with the script

  • Have you downloaded the latest version of the script verify-app.sh?
  • Taking forever - the script never finishes? Try adding fewer contact by using the option --contacts. To add only one contacts (in one session) followed by 10 contacts (in another session) type: ./verify-app.sh --contacts 1

When am I finished?

We have included (secretly) another script in the zip file for you. You should have a file called verify-app.sh in the same directory as the files build.sh. This script, as the name implies, is used to verify that your program (or app) is working properly.

If you see a printout which contains something like the below you're finished:

*********************************
 *
 * All is well...
 *
*********************************

Links

Where to go next

The next page has optional tasks, not mandatory for passing the address book assignment - only for the brave! Java:Assignment_-_Address_book_-_Optional Read it even if you don't plan to solve these optional tasks.

Note! Don't send in the optional tasks to the teachers. Send in the mandatory version only, and keep the challenge and optional parts to yourself. The teachers won't correct the optional tasks version, because it differs so much from the mandatory version.

« PreviousBook TOCNext »