Project 4 (Part 2)

THIS IS PART OF PROJECT #2 and is NOT part of project #4

Go back to the main project webpage and click on project #4

Read the above! This is part of project #2 (not project #4)

Your customer has given a rough sketch of what they expect your program to behave.

In the initial phase, each person applies to get an account. The account will be either gold, silver, or bronze, with gold being the "best" and "bronze" being one with the least features.

Each application will look like the following:

<apply>
<name> Jan Plane </name>
<alias> harrypotter </alias>
<payment> 100 </payment>
<member> 2 </member>
<acct>
   <name> Arras Bank </name>
   <number> 1001 </number>
</acct>
</apply>
When applying, you must submit your name, an alias, a payment. how many years you've been a member, and back account information. This information is the name of a bank and the bank account number.

You can assume a person's name consists of a first and a last name. An alias will be a single word. The alias must be different from other aliases already registered by other members. Names, on the other hand, might be duplicated. The payment is an integer, as is the number of years. The bank's name will always be two words. The account will always be a four digit number, where the first digit is not zero.

This information will be passed to a class (which will be partly written for you) and return back the kind of account you have (gold, silver, or bronze). Furthermore, you will be given a password (your username will be your alias). For the time being, don't develop the classes for acquiring an account. This can be handled later.

Once the account has been decided, the new member can do one of several things.

First, a member can add friends. This operation looks like:

<cmmd> add
  <person> John Arras </person>
  <friend> Jan Plane </friend>
</cmmd>
When you have a friend, you may wish to list out their name, or list out their alias. Thus, there is an operation to print out their names in alphabetical order, or list out their alias in alphabetical order.

The main operation, however, is to submit a journal entry or an MP3 entry.

<cmmd> submit
  <alias> harrypotter </alias>
  <password> induction </password>
  <type> journal </type>
  <date> 2/2/2002 2:30 PM </date>
  <title> Exam </title>
  <body>
    I wrote exam questions today, and am ready for the
Thursday exam.   TAs will look it over.   I hope the
students are ready for it!
  </body>
</cmmd>
An entry will be submitted by alias and password. It will either be a "journal" entry or an "mp3" entry. A "journal" entry will consist of the date, a "title" which is one line long, and a body, which is the body of the text. A "mp3" entry will consist of the date, the title of the MP3, the number of minutes, the album name. Different people can submit journal entries.

A person can followup on other people's journal entries. That would look something like:

<cmmd> submit
  <alias> harrypotter </alias>
  <password> induction </password>
  <type> journal followup </type>
  <orig_alias> johnman </orig_alias>
  <orig_date> 12/31/01 1:29 AM </orig_date>
  <date> 2/2/2002 2:30 PM </date>
  <title> Exam </title>
  <body>
   That was a good question for the final.   I will type
it up.  I hope no one reads our journal entries!
  </body>
</cmmd>
A follow up is a response to a journal entry. To specify this, you need the other person's alias and the date that the journal entry was posted. Even a follow up can be followed up. MP3's aren't followed up.

You can list out the entries in sorted order by date and time (most recent first). This is a fairly important operation, because it's the one area where you will list out something in sorted order (hint, hint: you have written classes that can handle sorting). This will print the title, and the body (plus followups).

You can also list this in calendar order, that is, a month, and the list of days and number of entries per date.

You can also list out the ten most recent entries of all your friends put together.

You can also delete entries. This will cause the entry to be deleted as well as any followups.

When deciding on classes, start with the simplest classes. Determine data members and methods.

Web Accessibility