AccountInfo1
Home Schedule Prime Directives Engineering Log Coding Standards Software Submission Checklist Dr. Hacker

 

Goal

The goal of this assignment is to get you started programming immediately, to help you decide whether this class is for you, and to start motivating the tools and techniques that we will be examining in this class.

Requirements

The AccountInfo1 package provides a class called "AccountInfo" which implements information about a set of users for a system. In this initial version, your system should support the following:

There are three basic types of accounts: Administrator, Faculty, and Student.  There may be additional types of accounts in the future. You should consider the design trade-offs of using inheritance, interfaces, composition, or some combination in your implementation.
Every account includes an account name and an account password.
Account names must be unique across all user classes.
Account names and passwords must consist of only upper and lower case letters and the digits 0-9.
In addition, account passwords must be at least six characters and contain at least one upper case character, at least one lower case character, and at least one numeric character. 
Each account also includes supplementary information.  Initially, support the user's first and last name and their email address.  Additional account information will be required in the future.

Clients of the AccountInfo class will want to use it to create, delete, query, and modify accounts.  The AccountInfo class should expose an application programming interface (an API, or in other words, a set of public methods) that allow clients of the class to carry out appropriate functions on the AccountInfo class.  It is up to you to design an appropriate API that exposes to clients of the class a natural interface to the system, and hides internal elements and processing.

The AccountInfo1 package does not provide persistence.  Account data does not need to be stored between runs of the system. However, account data does need to be stored during a run of the system.  In other words, you will need to implement an internal data structure (one of the Java collections classes) to hold information about accounts.

You will need to implement a set of test cases that thoroughly exercise the system.  The test cases should test for both valid manipulation of the AccountInfo class as well as invalid manipulation.  An example of an invalid manipulation would be an attempt to create an account with an account name that already exists in the system.  The test cases should be implemented as a set of methods belonging to a class named TestAccountInfo.

Invalid operations should throw an exception called AccountInfoException.

Your system should attempt to achieve the Three Prime Directives of Java-based Open Source Software Engineering.

Feel free to talk to others in the class about your project.  Feel free to ask them to look at your code if you have an error and want some help debugging it.  However, your code must be your own.  If you need to cheat and use someone else's code this early in the semester, you should definitely drop the course.

Helpful resources

Nutshell books, sections on "Collections"
JDC Tech Tip on Using List Collections Efficiently
The Java Developer Connection, providing a cornucopia of tutorials and reference material on Java.

Submission requirements

Due date: January 30, at noon, via email.  We will review as many systems as time allows in class.

Things to turn in:

An email message to johnson@hawaii.edu containing a link to the zip file. This email is due by noon on January 30.  Please use a complete URL, such as "http://www2.hawaii.edu/~johnson/johnson-accountinfo1-1.0125.zip".  Please do not use a partial URL, such as "www2.hawaii.edu/..."  By using a complete URL, I can click on the link in my mailer to download it. 
   
Your engineering log.  It should contain an entry for each day you worked on the system.

In class, I will download selected zip files from the web, unzip them, invoke setEnv, and invoke Ant targets to compile, test, and generated documentation for this system.  I will also check that various support files (README.html, History.html, accountinfo.jpx, LicenseInfo.html, manifest, and JBuilder.html) have been updated. So that I can unpack multiple projects without name conflicts, please name your Ant project <username>-accountinfo1.  (For example, my zip distribution might be named "johnson-accountinfo1-1.0125.zip". 

A word to the wise: for best results, start immediately and implement the system as best you can, then redesign, rewrite, and improve your package as you learn about IDEs, build systems, and coding standards.

To help ensure that your assignment gets as many points as possible, I have posted a Submission Checklist.