Lab 11
Program 4 Evaluation
April 7, 2005
Lab Partners
Everyone should work with one lab partner on this assignment.
Purpose
The purpose of this lab is to give you experience evaluating
code. Often, by carefully looking at someone else's code, you gain new
ideas and can consequently improve your
own programming abilities.
Preliminaries
At the start of the lab, Mike will e-mail you another
team's solution to Program 4. Each team's solution will be
evaluated by one other team.
- Place this solution in a BlueJ project named inlab11
- Print out all of the source code for the project
Please provide answers to the questions
below in an MS-Word document. You may supplement these
answers by referring to the code directly and writing
on the printout. (For example, you might mention that you
have found redundant code in method A and method B of the
Queue class. You can then circle the redundant code in these
two methods and label the circle with the word "redundant" to
help Mike easily see what you are talking about.)
Run Analysis - 3 points
Answer these questions by running the program.
- Provide step-by-step instructions of how to run the program
with 3 shuffles in normal mode.
- How can the format of the output that the program produces be improved?
- Run the program with 0 shuffles in normal mode. Is the output correct?
- Run the program with 0 shuffles in random mode. Is the output correct?
- Run the program with 1 shuffle in normal mode. Is the output correct?
- Run the program with 1 shuffle in random mode. Is the output correct?
- Run the program with 2 shuffles in normal mode. Is the output correct?
- Run the program with 100 shuffles in normal mode. Is the output correct?
Code Analysis - 6 points
Answer these questions by looking at the code.
- How can the Javadoc comments be improved?
- How can the commenting in general be improved?
- How can the indentation be improved?
- How can the meaningfulness of the names be improved?
- Point out any redundant code.
- Point out any code that is not clearly written.
- How can the class design be improved?
- Look at the code that performs the shuffling. Are there
any flaws with this code?
- Explain in detail the underlying data structure of the
queue ADT.
- Was the specified QueueInterface used exactly? If not,
explain any differences.
- Identify any space inefficiencies in the solution.
- Identify any time inefficiencies in the solution.
- Describe three other weaknesses of the code.
- Describe three other strengths of the code.
Conclusion - 1 point
- What single thing most impresses you about the solution
that you evaluated?
- What is the one biggest piece of advice that you would
give to the authors to improve the quality of their programs
in the future?
What to Submit
Before the end of the lab period, hand in the following
to Mike:
- The word processed document that you created. Be sure
that your names are on it.
- The printout of the other team's code that contains your
handwritten comments.
Also, please print out a second copy of the word processed document
that you created. Give this copy to the authors of the program
that you evaluated.
Before Lab Ends
Delete any BlueJ projects that you created and empty the recycle
bin. Thanks.