PSP Exercise

Completing the Time Recording Log Form

Objective

Instructions
  1. Review the Instructions for the Time Recording Log.
  2. Obtain blank copies of the form you need.
  3. Read the attached Scenario that describes the work of Rick, a student completing a class programming assignment.  As you read and interpret the scenario, record the data in the appropriate places in the Time Log. If you are uncertain how to fill in the forms, refer to the form instructions or consult the instructor.
Unit Development Scenario

Rick has a class project to create a simple Blackjack card game.  Rick begins work [4:40] by gathering all the resources he needs to begin. He reviews the assignment directions to make sure nothing is missing.  [4:55] Rick writes a few sentences describing the core features he has to build.  Then he sketches a simple class diagram of the classes he thinks he will need in his solution.  [5:23] Rick gets up to stretch and gets something to drink from the kitchen. While he's in the kitchen he puts a potato in the oven for dinner.

Returning with a drink, [5:35] Rick opens a text editor and types "public class Card".  He creates the code on-the-fly and enters it into the editor.  He completes the Card and Deck classes in one sitting, saves his work, and stops for dinner. [6:17]   Returning after dinner [7:11] he codes the Game class and finishes the coding at 7:53.  Rick takes a bathroom and stretch break.  He calls a friend to make arrangements to meet for a run the next day.

At 8:15 Rick starts compiling his code.  He gets numerous error messages but most of them are typing mistakes and he is able to resolve them quickly.   He continues a cycle of compile, read the error message, isolate the problem, modify the code, and recompile.  Continuing in this manner, he compiles the Card, Deck and Game classes, one by one. Eventually the compiler informs him there are no errors in his code.  [9:20]  Content with his progress, he decides to stop and work on homework for his other classes.

The next morning Rick resumes working on his program [9:23].  When he executes the program, the opening prompts appear, but when it tries to deal a card it crashes. He has to study his code for a while to figure out what went wrong.  After a bit of study he discovers the problem and changes one line.  He patiently runs the program repeatedly, encountering more errors and fixing them.  Eventually it stops crashing, but doesn't seem to be playing according to the rules.  Further sleuthing uncovers a logic error.  His phone rings and it's a friend asking if he finished his English paper yet. He chats for two minutes then returns to his game.  He fixes the logic error and now the game seems to be working properly.  He plays several rounds of Blackjack just to test it out.  At 9:48 he opens the editor again and reads over his code.  He recalls the instructor doesn't like one-character variable names, so he renames several variables.  He compiles the program and an error appears.  Examining the code he sees he forgot to rename the variable in one place, causing the error.  He fixes the mistake and the program compiles successfully. [10:07]


Note: This scenario lacks detail for defects.
Document History
4/6/11  JD  Initial Release