Vous êtes sur la page 1sur 3

Lab 1 Aubiebook Messaging Application Design Potion: 1.

Analysis - Add a friend (f): When the user enters option 'f' from the Main menu the user will then be prompted for the name of the friend. If the friend's name exits it adds the friend in the current user's friend list. If not it will display an error message and return to the main menu. - Post a message (p): When the user enters option 'p' from the main menu the user will be prompted for the message and stores the message in the user's wall page file with the user's name. - Tweet a message (t); When the user enters option 't' from the main menu the user will be prompted for a message and stores it. - Display wall page (w): When the user enters option 'w' from the main menu the program will display a title indicating that it is displaying the current user's wall page. Then it will display the latest three message in the current user's wall page in reverse chronological order. The user will then be prompted to see more messages. If the user enters 'no' then it will stop displaying messages. If the user enters 'yes' then it will display all the remaining messages from that user. (User won't be prompted if they have 3 or less messages) - Display home page (h): When the user enters option (h) from the main menu the program will display the current user's home page title and then display only the three latest messages from the user's wall page, from the user's friend(s) wall page(s) and tweets from that user only in reverse chronological order. messages from this user and other users will have a '~' after it and then followed by that user's name. The user will then be prompted to see more messages. If the user enters 'no' then it will stop displaying messages. If the user enters 'yes' then it will display all the remaining message from the user's wall page, from the user's friend(s) wall page(s) and tweets from that user. (User won't be prompted if they have 3 or less messages/tweets) - Quit AubieBook System (q): When the user enters the option 'q' from the main menu the program will exit.

2. Design One class design; System class controls all data flow of the AubieBook System. This class will write and read from all shared files. Menu will be dealt with in main(). Class Diagram:

Data Flow Diagram:

3. Testing 1) System (main) testing (note: this is not the testing for the System class) a) Test: Result: creation of a System class 1 functional System object

b) c)

Test: Result: Test: Result:

mainMenu() for correct display correct display of all menu options User inputs option at main menu that doesnt exist error message is displayed and user is asked for input again User inputs option (f) at main menu Correct call to System::addFriend(string friend) User inputs (p) at main menu Correct call to System::post() User inputs (t) at main menu Correct call to System::tweet() User inputs (w) at main menu Correct call to System::showWall() User inputs (h) at main menu Correct call to System::showHome()

d)

Test: Result: Test: Result: Test: Result: Test: Result: Test: Result:

e) f) g) h)

2) Class Testing Class System testing: a) Test: Result: b) Test: Result: c) Test: Result: call addFriend(string friend) with a name that is not in the system error message displayed and user is displayed the main menu call addFriend(string friend) with a name that is in the system string friend is correctly added to users <user>friendList.txt file

Vous aimerez peut-être aussi