P4 Implementation Details

Revisions

Click here for older version

Some comments:

. Assumptions you can make

TextField objects in Gui

The following are a list of the names of TextField objects. You should add these as TextField * data members of Gui and initialize in the constructor of Gui. You may wish to write a function called trim() which removes blanks at the beginning and end of lines to help you edit the input, when you retrieve it from the TextGui object (see the header file for methods provided). Notice that most entries have possible leading or trailing blanks.

Output BNF

As stated in the beginning of this webpage, you may assume when the button is pressed that the text fields have already been filled out.

The output BNF will have a similar structure to the previous projects

<output> := <line>
                    [ ["Button Pressed: (" <word> ")" <endl> <out> <line>]+ |
                      "NO BUTTONS PRESSED" <endl> <line> ]
                    <endl>

      <line> ::== "----*----*----*----*----*----*----*----*" <endl>
You should produce output only when buttons are pressed (no output when entering text fields). The first line printed indicates the button pressed. The following lines printed are indicated below. So, the first line of each output is the name of the button pressed, followed by whatever output is specified in the next section. Here's an example of the output.
----*----*----*----*----*----*----*----*
Button Pressed: (apply)
....more stuff....
----*----*----*----*----*----*----*----*
Note: you may need to modify main() to get this to work.

Buttons Specifications

The following are a list of buttons. Each button corresponds to an operation.

A follow up fails if there is no article at that date and time. It also fails if the followup time is BEFORE the time of the article it follows up.

GOLD, SILVER, BRONZE

Each member will have one of three kinds of memberships. The primary input will only have members with GOLD membership to make your life easier.

Followups

You can followup to any journal entry or MP3. The followup will always be another journal entry. Followups can also be followed up. For example, if member A posts an article, then any member can post a followup to A (say, member B). Suppose member C follows up to A. Then, the output looks like:
AAAAAA
AAAAAA

.....BBBBBB
.....BBBBBB

.....CCCCCC
.....CCCCCC
assuming that B's article has a date that occurs before C's article.

Assumptions

The commands are not guaranteed to be given in chronological order. For example, the input file may post a journal entry on October 2, 2000, then a journal entry on May 10, 2000.

Secondaries

Likely tests. Initially, try to get the project working without any followups, assuming GOLD membership, and just regular friends (no good friends). You should then work on good friends and followups first, and BRONZE and SILVER later on.

Web Accessibility