Basic Barber Shop Project Grader Sheet
Notes to the Grader!!

What follows is the grading sheet for Basic Barber Shop Project. What is here are my comments related to grading.

  1. Do not attempt to read code (not required as hardcopy), rather use the intro comments to drive any concerns you might have. If the comments are incomplete, then it is their problem.
  2. There should be no 'real' pointers, everything should be off of arrays and indices into those arrays.
  3. The circular queue will not be circular once all 3 lists are operating, but at least people should have coded it as a circular queue.
  4. Look at the output runs and use those to determine if the programs work. if you have real questions then we can ask for a realtime run at a later time.
  5. As far as bad inputs, input3.1, there is no specified operation - quiting is fine or just doing defaults is fine. what is not fine, is to crash.

Note: If you have not turned in the Barber Shop Project, then DO NOT READ this or the related input files.
Note: You are NOT to modify your code in any way from that turned in as Project 3.

Introduction

35 points total, 15 for the turned in project, 20 for the runs. If the student has highlighted the runs appropriately, grading should be quick.

Input Files:

  1. input3.1 -
    • consumer sleep = -1
    • print shop contents
    • producer sleep = -3
    • highlight: start of the program, final counts
    • Demonstrates: tests the robustness of your argument checking.
    This is the original input with lousy start parameters. Recovery is actually your choice, but you must recognize the bad parameters.
    2 grunts, 3 noncoms, 3 officers
    03
    03
    13
    13
    13
    23
    23
    23
    
    
    

  2. input3.2 -
    • consumer sleep = 1
    • print shop contents
    • producer sleep = 2

    • Demonstrates: priority; should see a total of 5 officers, 5 noncoms, 6 grunts.
      • 3 officers should get hair cut 1st
      • then some number of noncoms,
      • then a new officer (#4)
      • then noncoms and maybe a grunt
      • then another officer (last input)
      • then finish noncoms & grunts.
    • highlight: each officer entering Barber Shop and getting hair cut, and processes dying.
    25
    25
    25
    13
    13
    13
    13
    13
    25
    02
    02
    02
    02
    02
    02
    25
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  3. input3.3 -
    • consumer sleep = 66
    • print shop contents
    • producer sleep = 3
    • highlight: officer entrance into Barber Shop and hair cut, grunt enter into Barber Shop, grunt hair cut.
    • Demonstrates: ability to handle full queue and to handle new entries having a higher priority then those currently waiting.

    should see queue fill up, 18 nc, 1 g, 3 officer. officers should get hair cut 1st, then nc, then grunts.
    11
    12
    13
    14
    15
    15
    14
    12
    13
    11
    23
    24
    12
    13
    11
    12
    13
    11
    12
    13
    03
    25
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  4. input3.4 -
    • consumer sleep = 45
    • print shop contents
    • producer sleep = 3
    • Demonstrates: priority movement.
    • highlight: officers entering Barber Shop and getting hair cut and processes dying.

    see a mixed Barber Shop of officers, noncoms, and grunts. officers should come in and move ahead for haircuts.
11
12
13
14
15
01
02
03
04
05
01
02
03
04
05
14
13
12
11
21
22
23
24
25
24
23
22
21

What are you to do?

  1. Each individual is to resubmit project 3 with the following stapled together (for those who do not have a stapler, buy one or borrow one - unstapled projects will be immediately rejected)):
    • Project 3 Grade sheet as cover (this page) with you Name on it.
    • Your complete highlighted listings (use lp4 or some other way to save paper) for runs of the inputs described above.

Last modified November 20, 01 by mike@cs.hmc.edu