Example Report
Hi everybody,
I've copied an example of the program test report for assignment 5 below. Most of you had trouble getting at least some parts of your programs to work well. Please have a look at the output of this assignment. Please also let me know if you need an example implementation.
I've included below the contents of the files that I used to test your programs. The contents are shown at the top of the Test Results section. By comparing your program's output with the contents of these files, it should be clear what the results should have been and what errors should have been handled. I tested your programs more harshly than I scored them. Failing to pass some of these tests will not lead to point deduction.
Let me give a brief explanation of all the cases that I tested.
Biagioni.txt is the example book provided in the assignment. I tested that your program searched for email address and deletes entries. I also tested that your program did not crash when searching for entries that do not exist. I also tested that your program saved the data back in order.
GoodBook1 tested that you correctly read in the entries that were already in order.
GoodBook2 tested that you correctly read in the entries that were in reverse order.
GoodBook3 tested that you correctly read in phone books with duplicate name entries.
GoodBook4 tested that you correctly read in empty phone books.
GoodBook5 tested that you correctly read in funky email addresses.
BadBook1 tested that your program rejected incomplete files.
BadBook2 tested that your program rejected files with phone numbers with text in them.
BadBook3 tested that your program rejected files with phone number with symbols in them or email addresses without the "@" in them.
BadBook4 tested that your program rejected files with blank phone numbers.
BadBook5 tested that your program rejected files with blank names and email addresses.
I also tested that your program checked command line arguments and checked for NoSuchElementException.
Again, I tested your programs more harshly than I scored them. Failing the pass some of these tests will not lead to point deduction.
If you submitted your assignment 5, by tomorrow, you will have received an email from me with your report. If you haven't received the email by tomorrow, let me know. Also let me know if you have any questions regarding your score.
Cheers!
Jade
Here is your score for Assignment 5.
Score: TBD%
Let me know if you have any questions regarding your score. And let me know if you want a copy of an example implementation for the assignment.
Regards,
Jade
Grading Guildelines
Test Results
The following files were used during the tests:
-
Biagioni.txt
Jade Cheng
18081234567
yucheng@hawaii.edu
Edo Biagioni
18089563891
esb@hawaii.edu
Edo Biagioni
12345678901
esb@hawaii.edu
-
GoodBook1.txt
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
-
GoodBook2.txt
C
3333333333
C@C.COM
B
2222222222
B@B.COM
A
1111111111
A@A.COM
-
GoodBook3.txt
a
4444444444
a@4.com
A
3333333333
A@3.com
a
2222222222
a@2.com
A
1111111111
A@1.com
-
GoodBook4.txt
-
GoodBook5.txt
Chris
1234567890
Chris@hawaii.edu
Bill
1234567890
B.i.l.l@hawaii.edu
Adam
1234567890
Adam@h-a-w-a-i-i.edu
-
BadBook1.txt
A
-
BadBook2.txt
A
ONE-TWO-FOUR
A@a.com
-
BadBook3.txt
A
(808)-123-4567
A_a.COM
-
BadBook4.txt
A
A@A.COM
-
BadBook5.txt
1234567890
1234567890
Directory Contents:
Edo Biagioni
12345678901
esb@hawaii.edu
Edo Biagioni
18089563891
esb@hawaii.edu
Jade Cheng
18081234567
yucheng@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: esb@hawaii.edu
Edo Biagioni
12345678901
esb@hawaii.edu
Edo Biagioni
18089563891
esb@hawaii.edu
Directory Contents:
Edo Biagioni
12345678901
esb@hawaii.edu
Edo Biagioni
18089563891
esb@hawaii.edu
Jade Cheng
18081234567
yucheng@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: yucheng@hawaii.edu
Jade Cheng
18081234567
yucheng@hawaii.edu
Directory Contents:
Edo Biagioni
12345678901
esb@hawaii.edu
Edo Biagioni
18089563891
esb@hawaii.edu
Jade Cheng
18081234567
yucheng@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: Edo Biagioni
Done removing. The number of entries removed is 2
Directory Contents:
Jade Cheng
18081234567
yucheng@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: Edo Biagioni
No such entry to remove.
Directory Contents:
Jade Cheng
18081234567
yucheng@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: Jade Cheng
Done removing. The number of entries removed is 1
Directory Contents:
The database is empty.
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: Someone Not In The Directory
No such entry to remove.
Directory Contents:
The database is empty.
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: SomeoneNotIn@TheDirectory.com
No such email address found.
Directory Contents:
The database is empty.
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: save
Done saving.
Directory Contents:
The database is empty.
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: quit
% TYPE Biagioni.txt
% TYPE Biagioni-Golden.txt
% FC /L /N Biagioni.txt Biagioni-Golden.txt
Comparing files Biagioni.txt and BIAGIONI-GOLDEN.TXT
FC: no differences encountered
Directory Contents:
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: save
Done saving.
Directory Contents:
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: quit
% TYPE GoodBook1.txt
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
% TYPE GoodBook1-Golden.txt
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
% FC /L /N GoodBook1.txt GoodBook1-Golden.txt
Comparing files GoodBook1.txt and GOODBOOK1-GOLDEN.TXT
FC: no differences encountered
Directory Contents:
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: save
Done saving.
Directory Contents:
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: quit
% TYPE GoodBook2.txt
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
% TYPE GoodBook2-Golden.txt
A
1111111111
A@A.COM
B
2222222222
B@B.COM
C
3333333333
C@C.COM
% FC /L /N GoodBook2.txt GoodBook2-Golden.txt
Comparing files GoodBook2.txt and GOODBOOK2-GOLDEN.TXT
FC: no differences encountered
Directory Contents:
A
1111111111
A@1.com
a
2222222222
a@2.com
A
3333333333
A@3.com
a
4444444444
a@4.com
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: save
Done saving.
Directory Contents:
A
1111111111
A@1.com
a
2222222222
a@2.com
A
3333333333
A@3.com
a
4444444444
a@4.com
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: quit
% TYPE GoodBook3.txt
A
1111111111
A@1.com
a
2222222222
a@2.com
A
3333333333
A@3.com
a
4444444444
a@4.com
% TYPE GoodBook3-Golden.txt
A
1111111111
A@1.com
a
2222222222
a@2.com
A
3333333333
A@3.com
a
4444444444
a@4.com
% FC /L /N GoodBook3.txt GoodBook3-Golden.txt
Comparing files GoodBook3.txt and GOODBOOK3-GOLDEN.TXT
FC: no differences encountered
Directory Contents:
The database is empty.
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: save
Done saving.
Directory Contents:
The database is empty.
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: quit
% TYPE GoodBook4.txt
% TYPE GoodBook4-Golden.txt
% FC /L /N GoodBook4.txt GoodBook4-Golden.txt
Comparing files GoodBook4.txt and GOODBOOK4-GOLDEN.TXT
FC: no differences encountered
Directory Contents:
Adam
1234567890
Adam@h-a-w-a-i-i.edu
Bill
1234567890
B.i.l.l@hawaii.edu
Chris
1234567890
Chris@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: save
Done saving.
Directory Contents:
Adam
1234567890
Adam@h-a-w-a-i-i.edu
Bill
1234567890
B.i.l.l@hawaii.edu
Chris
1234567890
Chris@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: quit
% TYPE GoodBook5.txt
Adam
1234567890
Adam@h-a-w-a-i-i.edu
Bill
1234567890
B.i.l.l@hawaii.edu
Chris
1234567890
Chris@hawaii.edu
% TYPE GoodBook5-Golden.txt
Adam
1234567890
Adam@h-a-w-a-i-i.edu
Bill
1234567890
B.i.l.l@hawaii.edu
Chris
1234567890
Chris@hawaii.edu
% FC /L /N GoodBook5.txt GoodBook5-Golden.txt
Comparing files GoodBook5.txt and GOODBOOK5-GOLDEN.TXT
FC: no differences encountered
Directory Contents:
Edo Biagioni
12345678901
esb@hawaii.edu
Edo Biagioni
18089563891
esb@hawaii.edu
Jade Cheng
18081234567
yucheng@hawaii.edu
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option:
Usage: ChengJade5 path
Unable to open the file BadPath.txt
Usage: ChengJade5 path
Unexpected end of file BadBook1.txt
Invalid phone number: ONE-TWO-FOUR
Invalid phone number: (808)-123-4567
Invalid phone number:
Directory Contents:
1234567890
1234567890
Choose one of the four options:
1) Type 'quit' to exit the program.
2) Type 'save' to save the database.
3) Type an email address containing '@' to find matching entries.
4) Type a name to remove.
Your option: