Basic Barber Shop Project Grader Sheet
Notes to the Grader for the Runs!!
What follows is the grading sheet for Basic Barber Shop Project
related to grading the Runs of a working barbershop.
-
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.
-
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: Some people found major problems in their code and modified it
(after talking to me).
Somewhere this should be noted in their comments. They lose 5 points.
Introduction
20 for the runs.
If the student has highlighted the runs appropriately, grading
should be quick.
-
5 Points max for correct performance on each of the
4 input files.
They either work, are highlighted, and commented or they are not.
-
If the highlights and comments do not cover the following, then
take off points:
-
10 points if they did not highlight and comment.
-
5 points if they did not comment after highlighting.
Input Files:
-
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
-
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
-
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
-
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
Last modified December 1, 01 by mike@cs.hmc.edu