Lab 8

March 11, 2004

Partners

You may work with at most one other person on this assignment. If you do, you will both receive the same grade.

Program 3 Submission

At the start of the lab period, Alex or Ashish will collect your lab materials and distribute them randomly to another team.

Program 3 Self Assessment

Spend the first 15-20 minutes of lab producing a document that contains the following:

  1. A picture of the linked list data structure that you used to hold the cards in your Program 3 solution.
  2. An English description of the constructDeck strategy that your Program 3 used.
  3. An English description of the shuffle strategy that your Program 3 used.
  4. An English description of any known flaws in your Program 3.

Assessing Another Team's Program 3

Now spend some time familiarizing yourself with the other team's solution. You might want to look through the code and install their solution on your local machine. Now answer the following questions regarding the other team's program 3:

  1. Draw a picture of the linked list structure that is used to hold the cards.
  2. Describe the constructDeck strategy in English. What are its strengths? What are its weaknesses?
  3. Describe the shuffle strategy in English. What are its strengths? What are its weaknesses?
  4. What is the best case time complexity of the shuffle strategy? Use "big Oh" notation. Justify your answer in English.
  5. What is the worst case time complexity of the shuffle strategy? Use "big Oh" notation. Justify your answer in English.
  6. Run the program. Comment on the strengths and weaknesses of the appearance of the output that is produced.
  7. Run the program. Do the simulation results look reasonable? Explain.
  8. Look at the code. Are aces being handled correctly? Explain.
  9. Look at the code. Describe two areas that haven't been previously addressed that can be improved.
  10. Look at the code. Describe two areas that haven't been previously addressed that are strengths.

What To Submit

Before You Leave

Please delete any BlueJ projects that you created and empty the recycle bin. Have a great Spring Break!

Valid XHTML 1.0!