mac 232 finalproject

7
Abdou Thioye MAC 232 Final Project Flow Chart and Pseudocode Flowchart User Input Choices: Aa Ss Pp Dd Vv Qq Exit User presses Contacts. Input: Name ContactMe * Run Script Delete Contact? $less Exit Start Run Script: ContactMenu

Upload: abdou-thioye

Post on 18-Aug-2015

36 views

Category:

Documents


1 download

TRANSCRIPT

Abdou ThioyeMAC 232Final ProjectFlow Chart and Pseudocode

Flowchart

User Input Choices:

Aaaa

Ss Pp Dd Vv Qq

Exit Menu

User presses Enter

Return to Menu

Contacts.txt

Input: Name

ContactMenu

Delete name? or q

y

*

n

Run Script PrintContact

Print Contacts.txt

RunScript:

AddContact

Press Enter

Delete Contact? Name?

Delete Contact and all related information

$less Contacts.txt

Return to Menu

Exit

Start

Run Script: ContactMenu

Sort –k 2 –t: Contacts.txt | uniq

Pseudocode

Return to Menu Contacts.txt

Input New Contact Information

Return to Menu

Invalid Option

Return to Menu

Press Enter

Choose y, q or copy

Restart $looptest=y

Add New Contact info to…

Contacts.txt

Ctrl+C

y

q

Set loop to equal yWhile loop is equal to y, Do

Clear screenDisplay Menu and Menu OptionsWait for user input

CASE Menu selection based on user input

A– Execute “AddContact” script D- Request name of who is to be deleted from “Contacts.txt”.

IF user presses y THENDelete all information regarding the name inputted by user from “Contacts.txt”ENDIF

P- Execute “PrintContact” script S- Execute “FindContact” scriptV- View the “Contacts.txt” contentsQ- Exit the menuAny other key- Display “Invalid Option” and return use to menu options

ENDCASEDone

The Menu and scripts in the following order

My Contact Menu

Contacts.txt (The Contact Book)

AddContact Script

ContactMenu

FindContact

PrintContact