Section E: Testing Strategy

The Main Menu

 

The first screen that appears upon the execution of the dossier program is that of the main menu.  At the end of this menu is a prompt that asks the user to enter their choice from the list.  This prompt expects a alphabetical input in the range of ‘a’ to ‘l’.

 

Input

Expected Result

a

exit from program

b

entry into display all screen

c

entry into display one screen

d

entry into insert new screen

e

prompt for file to open and copy

f

prompt for file to open

g

entry into delete single screen

h

entry into delete all screen

I

entry into match location screen

j

entry into match interests screen

k

entry into rate screen

l

entry into direct add / delete / update screen

anything other than the above letters

error message that leads back to menu

Figure 1: Input / Result Data Table for the Main Menu

 

Displaying All Museums

 

            This option requires no input from the user.  It merely displays the entire list of museums that are found in the database, along with all of the information about it.

 

Displaying Selected Museum

 

            The first prompt in this option asks for the name of the museum to display.  This field expects a string (more exactly, an apstring).  However, there are restrictions on spacing, so anything with more than one word must be divided by a ‘_’.  The prompt that follows asks for the name of the city in which the aforementioned museum is found.  It also expects a string, and yet again has restrictions on spacing.  After this information has been entered, one of two things will happen.  Either the program will display the information about the selected museum (if it is in the database), or it will give an error message informing the user that that certain museum is not in the database.

 

 

 

 

Input

Expected Result

Louvre

accept data, move to next prompt

Paris

accept data, move to next prompt

any entry (not string, more than one word, etc)

message informing user that target could not be found

Figure 2: Input / Result Data Table for Displaying a Selected Museum

 

Inserting A New Museum From the Keyboard

 

            The first prompt asks the user for a museum ID, and expects an integer value.  The next prompt asks the user for a museum name, expecting a single string.  The next prompt asks the user for the major type of art found in the museum, expecting a single string.  The next prompt asks for the number of works in the museum’s collection, expecting an integer (more specifically, a long integer).  The next prompt is for the location of the museum (city), and this expects a string input.  Next, the hours of operation are asked for, expecting a string (most likely, an input like 8-5).  The next prompt is for the admission price, expecting a double.  The last name of a famous artist whose work is found in the museum’s collection is asked for, expecting a single string.  Next is a rating for the museum (out of 10).  This prompt expects a double.  The next prompt asks for the name of an upcoming exhibition, expecting a string, and is followed by a prompt for the date of this exhibition (as a string – entered dd/mm/yy).  The next prompt is for an estimate of the average cost of this trip (not including airfare).  This expects a double.  The next prompt is for a recommendation as to how long one should spend in the museum (in hours). This expects an integer value.  The next prompt is for the museums phone number, then address, and then web-site address, all three expecting a single string input.  The next prompt is a recommendation as to what type of tour to take (guided, recorded, none).  This expects a single string input.  The next prompt asks for the cost of the aforementioned tour, expecting a double.

 

Input

Expected Result

1

accept input, move to next field

Vatican

accept input, move to next field

Classical

accept input, move to next field

41242

accept input, move to next field

Rome

accept input, move to next field

8-5

accept input, move to next field

6.50

accept input, move to next field

Michelangelo

accept input, move to next field

9.60

accept input, move to next field

ArtExpo

accept input, move to next field

01/02/03

accept input, move to next field

400.00

accept input, move to next field

4

accept input, move to next field

231-4503

accept input, move to next field

123_Any_Street

accept input, move to next field

www.louvre.com

accept input, move to next field

guided

accept input, move to next field

4.50

accept input, move to next field

anything outside of range

error message displayed

Figure 3: Input / Result Table for Inserting a New Museum From the Keyboard

 

Enter a New Museum From File

 

            This prompt allows for no user input.  It copies the information about a museum from a file called newmuseum.dat to the existing database.  An error message will pop up if the file doesn’t exist or can’t be opened.

 

Write Entire List of Museums To File

 

            This prompt also allows for no user input.  It copies the entire database of museums and all of the accompanying information to a file called art_add.dat.  An error message will pop up if the file cannot be opened.

 

Delete An Existing Museum From the Linked List

 

            This prompt first shows the list of the museums in file and asks the user to enter the number of the museum that they want deleted, expecting an integer value.  Then, the record is simply deleted.

 

Input

Expected Result

1

accept input

anything outside of range

error message displayed, prompt to try again

Figure 4: Input / Result Table for Deleting Museum From the Linked List

 

Delete Entire List of Museums From Memory

 

            This prompt requires no user input – it simply erases the entire list of museums.

 

Destination Match

 

            This prompt first displays a list of cities that could be found in the database, and the user is asked to enter the name of one of those cities, expecting a string.  The program then shows a list of which museums are found in that city.

 

Input

Expected Result

Paris

accept input, display Louvre, etc.

anything not found in database

message that target was not found

Figure 5: Input / Result Table for Matching Destination to Museums

 

 

 

Interest Match

 

            This prompt asks the user to enter the last name of an artist or the type of art that they are interested in, expecting a string.  The program then shows a list of which museums match those interests.

 

Input

Expected Result

Michelangelo

accept input, display Louvre, etc.

anything not found in database

message that target was not found

Figure 5: Input / Result Table for Matching Interests to Museums

 

Rating A Museum

 

            This prompt first shows the user the names of the museums currently in the database.  It then asks the user to enter the number of the museum that they wish to rate, expecting an integer.  It then asks 6 different questions, to which the user should enter an integer between 0-10.  It then averages this rating with the existing rating in the database.

 

Input

Expected Result

1

accept input, move to next prompt

9

accept input, move to next prompt

anything outside of range

error message displayed

 Figure 6: Input / Result Table for Rating A Museum

 

Adding / Updating / Deleting Directly From / To File

 

            This prompt takes the user to another menu, expecting the user to enter an integer between and including 1 and 5.  This can be broken down into these 5 sections:

 

Input

Expected Result

2

accept input, takes user to adding a museum option

outside of range

informs user that they are out of range and prompts for another number

Figure 7: Input / Result Table for Direct Access Menu

 

1)      Storing To File: This prompt allows the user to store a formatted text file of accounts of museums to a file for printing.  No user input is required.

 

2)      Adding A Museum: This prompt asks the user for a few fields of data (record number as an integer, museum name as an array of characters, the quantity of works in the collection as a long integer, admission cost as a double, and a rating as a double).

 

Input

Expected Result

1

accept input, move to next prompt

Louvre

accept input, move to next prompt

12345

accept input, move to next prompt

6.70

accept input, move to next prompt

9.70

accept input, move to next prompt

repeat or outside of range

error message given, prompt to try again

Figure 8: Input / Result Table for Adding Museum Directly

 

3)      Deleting A Museum: This prompt shows the user the existing list of museums from the direct access file and prompts them to enter the number of museum that they wish to delete.  It then merely deletes this record.

 

Input

Expected Result

1

accept input, delete record from file

outside of range

error message, prompt to try again

Figure 9: Input / Result Table for Deleting Museum Directly

 

4)      Updating A Museum: This prompt allows the user to rate a museum from the direct access file.  It first displays the list of museums in that file, and prompts the user to enter which museum they wish to rate.  It then prompts the user to enter a new rating, and then proceeds to show the updated record for the museum.

 

Input

Expected Result

1

accept input, move to next prompt

9.70

accept input, average rating with old rating

outside of range

error message given, prompt to try again

Figure 10: Input / Result Table for Updating Museum Directly

 

5)      Quit: This prompt takes the user back to the main menu.

Back to home page