sh1k4ku commited on
Commit
667ca9b
·
verified ·
1 Parent(s): f752bd8

Upload assignment2.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. assignment2.html +19 -2
assignment2.html CHANGED
@@ -30,6 +30,8 @@
30
  .rules { color:var(--text); font-size:15px; line-height:1.7; background:var(--panel);
31
  border:1px solid var(--border); border-left:3px solid var(--accent);
32
  border-radius:8px; padding:10px 14px; margin:8px 0; }
 
 
33
  a { color:var(--accent); }
34
  table.dt { border-collapse:collapse; font-size:12px; font-family:"SF Mono",Menlo,Consolas,monospace; margin:4px 0; }
35
  table.dt th, table.dt td { border:1px solid var(--border); padding:3px 8px; text-align:center; }
@@ -103,7 +105,7 @@
103
 
104
  <!-- ============ Q1 ============ -->
105
  <h2>Q1 &nbsp;Extended Entry Decision Table <span class="pts">[6 pts] · single choice</span></h2>
106
- <p>Test the UNSW Lecture-Theatre Booking system with Decision-Table testing. Rules are checked one by one and the <b>first matching rule</b> applies. Outputs: <code>0</code>=Booked, <code>1</code>=Wait-list, <code>2</code>=Rejected.</p>
107
  <table class="spec">
108
  <tr><th>Input</th><th>Encoding</th></tr>
109
  <tr><td>room_size</td><td>1=Small, 2=Medium, 3=Large</td></tr>
@@ -112,7 +114,22 @@
112
  <tr><td>equipment</td><td>1=Standard, 2=AV, 3=ComputerLab, 4=Hybrid</td></tr>
113
  <tr><td>staff_role</td><td>1=Academic, 2=Admin, 3=Guest</td></tr>
114
  </table>
115
- <p class="rules">Rules: invalid input &rarr; rejected; exam weeks 11–12 allow only academics and block Large theatres; teaching weeks 1–10 have room/equipment/role constraints; otherwise booked. <b>Exactly one table below is correct — select it.</b></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  <div id="q1opts"></div>
117
 
118
  <!-- ============ Reference function ============ -->
 
30
  .rules { color:var(--text); font-size:15px; line-height:1.7; background:var(--panel);
31
  border:1px solid var(--border); border-left:3px solid var(--accent);
32
  border-radius:8px; padding:10px 14px; margin:8px 0; }
33
+ ol.rulelist { font-size:14px; line-height:1.7; padding-left:22px; margin:8px 0; }
34
+ ol.rulelist li { margin:6px 0; }
35
  a { color:var(--accent); }
36
  table.dt { border-collapse:collapse; font-size:12px; font-family:"SF Mono",Menlo,Consolas,monospace; margin:4px 0; }
37
  table.dt th, table.dt td { border:1px solid var(--border); padding:3px 8px; text-align:center; }
 
105
 
106
  <!-- ============ Q1 ============ -->
107
  <h2>Q1 &nbsp;Extended Entry Decision Table <span class="pts">[6 pts] · single choice</span></h2>
108
+ <p>Test the UNSW Lecture-Theatre Booking system with Decision-Table testing. The system decides each request as <code>0</code>=Booked, <code>1</code>=Wait-list, or <code>2</code>=Rejected. Rules are checked one by one and the <b>first matching rule</b> applies.</p>
109
  <table class="spec">
110
  <tr><th>Input</th><th>Encoding</th></tr>
111
  <tr><td>room_size</td><td>1=Small, 2=Medium, 3=Large</td></tr>
 
114
  <tr><td>equipment</td><td>1=Standard, 2=AV, 3=ComputerLab, 4=Hybrid</td></tr>
115
  <tr><td>staff_role</td><td>1=Academic, 2=Admin, 3=Guest</td></tr>
116
  </table>
117
+
118
+ <h3>Program description</h3>
119
+ <p class="muted" style="margin:4px 0">The program checks each rule one by one.</p>
120
+ <ol class="rulelist">
121
+ <li><b>A. Invalid Default.</b> If any input contains an invalid value, the request is immediately rejected. Room size must be Small, Medium, or Large; time slot Morning, Afternoon, or Evening; week between 1 and 12; equipment Standard, AV, ComputerLab, or Hybrid; staff role Academic, Admin, or Guest.</li>
122
+ <li><b>B. Exam-week nest.</b> In exam weeks 11–12, only academic staff may book; everyone else is rejected. Even academics cannot request a Large theatre — those halls are blocked out for exams.</li>
123
+ <li><b>C. Large-room.</b> Any request for a Large lecture theatre must clear three hurdles, otherwise rejected: (1) Evening slot (large rooms close after 17:00); (2) Computer-Lab equipment (there are no large computer labs); (3) Guest requester (guests may not reserve large rooms).</li>
124
+ <li><b>D. Equipment-specific.</b> A Small room plus Hybrid kit is rejected.</li>
125
+ <li><b>E. Guest + ComputerLab.</b> During teaching weeks 1–10, a guest wanting a computer lab is never accepted outright — the request is wait-listed.</li>
126
+ <li><b>F. Admin + Small.</b> An admin requesting a Small room is wait-listed if either the slot is in the evening, or it is exam week.</li>
127
+ <li><b>G. First-matching-theatre book.</b> If none of the above rules block the request, the system books the first room that matches the requested size, contains the requested equipment, and (for evening bookings) allows evening use.</li>
128
+ <li><b>H. Fallback.</b> If no room can be booked after all checks, the request is put on a general wait-list. <span class="muted">(Rule H is outside the scope of this decision table.)</span></li>
129
+ </ol>
130
+ <p class="muted">Assume that whenever a valid request is not blocked by Rules A–F, at least one matching theatre is always available.</p>
131
+
132
+ <p class="rules"><b>Notation.</b> <code>!</code> = not; <code>/</code> = alternative; <code>-</code> = a range (e.g. room_size <code>1-3</code>) or a don't-care. Week ranges are inclusive. The Default row applies when inputs are valid but match no prior rule. If a rule is already caught by an earlier rule, its outcome is <code>N/A</code>. Invalid rows use an out-of-domain value such as room_size 0 or week 13. <b>Exactly one table below is correct — select it.</b></p>
133
  <div id="q1opts"></div>
134
 
135
  <!-- ============ Reference function ============ -->