# Marking Guide and Exemplar Answers: Prac Exam Unit 1 AP
This marking guide provides solutions, grading criteria, and exemplar answers for the [Prac Exam Unit 1 AP.pdf](file:///c:/Users/7566-jgilbert/OneDrive%20-%20Department%20of%20Education/Documents/Applied%20Computing%20-%202026/Prac%20Exam%20Unit%201%20AP.pdf).
> [!NOTE]
> **Exam Structure & Labeled Mark Discrepancies:**
> * **Section A (Multiple-Choice):** Questions 1–8 (8 Marks total).
> * **Section B (Short Answer):** Labeled as **20 Marks** in the section header, but contains 4 questions worth 4 marks each, summing to **16 Marks** in total.
> * **Section C (Case Study):** Labeled as **30 Marks** in the section header and states "answer all seven questions that follow," but only contains 4 questions (Questions 2–5) summing to **18 Marks** in total. Question 1, 6, and 7 are missing from the exam paper.
> * **Total Actual Marks:** **42 Marks** (instead of the implied 58 Marks).
---
## Section A – Multiple-Choice Questions (8 Marks)
| Question | Correct Answer | Topic | VCE Study Design Reference |
| :---: | :---: | :--- | :--- |
| **1** | **B** | Non-Functional Requirements | Solution Requirements (Functional & Non-Functional) |
| **2** | **B** | Naming Conventions (Camel Case) | Code Construction & Naming Conventions |
| **3** | **C** | Digital Systems Configurations | Characterizing Digital Systems |
| **4** | **B** | Pseudocode Tracing (Mod & Loops) | Logic & Algorithm Development |
| **5** | **D** | Object-Oriented Principles | Programming Concepts & OOP |
| **6** | **C** | Data Structures (Records) | Data Structures & Types |
| **7** | **C** | Data Validation Techniques | Data Validation (Existence, Type, Range) |
| **8** | **A** | Design Tools (Sitemaps) | Solution Design Tools |
### Section A Detailed Explanations
#### Question 1
* **Correct Answer: B** (The system must process and load user dashboards within two seconds.)
* **Explanation:** A non-functional requirement specifies *how* a system should perform a quality, property, or constraint (e.g., speed, security, usability, reliability) rather than *what* it must do. Processing/loading within 2 seconds is a performance constraint.
* **Why others are incorrect:**
* **A, C, and D** are functional requirements because they describe specific behaviors and functions the software must perform (allowing password resets, generating weekly reports, calculating GST).
#### Question 2
* **Correct Answer: B** (totalMonthlyCost)
* **Explanation:** Camel Case (lower camelCase) starts with a lowercase letter, and the first letter of each subsequent concatenated word is capitalized.
* **Why others are incorrect:**
* **A** (`Total_Monthly_Cost`) uses underscores and capitalization (Pascal_Snake_Case).
* **C** (`intTotalMonthlyCost`) uses Hungarian Notation prefix (`int`), which is a variable naming style but not standard Camel Case alone.
* **D** (`TotalMonthlyCost`) is Pascal Case (Upper Camel Case) because it starts with a capital letter.
#### Question 3
* **Correct Answer: C** (Global Positioning System (GPS) devices linked to cellular networks)
* **Explanation:** Real-time location mapping of moving/physical assets requires hardware to determine coordinates (GPS) and a communication system to transmit those coordinates instantly to a central database (cellular networks).
* **Why others are incorrect:**
* **A, B, and D** combine irrelevant technologies (e.g., assistive technologies, financial services, data dictionaries, low-code) that cannot track and transmit physical coordinates in real-time.
#### Question 4
* **Correct Answer: B** (3)
* **Explanation:**
* The array is `[4, 7, 12, 9, 14]` (1-based index: `numbers[1]=4`, `numbers[2]=7`, `numbers[3]=12`, `numbers[4]=9`, `numbers[5]=14`).
* Tracing the loop:
* `index = 1`: `numbers[1] Mod 2 == 4 Mod 2 == 0` (True) $\rightarrow$ `count` becomes `1`.
* `index = 2`: `numbers[2] Mod 2 == 7 Mod 2 == 1` (False) $\rightarrow$ `count` remains `1`.
* `index = 3`: `numbers[3] Mod 2 == 12 Mod 2 == 0` (True) $\rightarrow$ `count` becomes `2`.
* `index = 4`: `numbers[4] Mod 2 == 9 Mod 2 == 1` (False) $\rightarrow$ `count` remains `2`.
* `index = 5`: `numbers[5] Mod 2 == 14 Mod 2 == 0` (True) $\rightarrow$ `count` becomes `3`.
* After `index = 5`, `index` increments to `6` and the loop terminates. The final value of `count` is `3`.
#### Question 5
* **Correct Answer: D** (Encapsulation)
* **Explanation:** Encapsulation is the object-oriented principle of hiding an object's internal data state and restricting direct access from external code, exposing only a controlled public interface (e.g., using private variables and public getter/setter methods).
* **Why others are incorrect:**
* **A** (Abstraction) is hiding unnecessary implementation details to show only essential features.
* **B** (Inheritance) is a mechanism where a child class inherits attributes and methods from a parent class.
* **C** (Polymorphism) allows different classes to implement methods with the same name that behave differently.
#### Question 6
* **Correct Answer: C** (Record)
* **Explanation:** A Record is a structured data type that groups related fields of *different* data types (such as integers, strings, and Booleans) under named variables representing a single entity.
* **Why others are incorrect:**
* **A** (One-dimensional array) must store elements of the same data type.
* **B** (List) is a sequential collection of values, but in computer science theory and standard study design, it is not optimized with named fields for heterogeneous attributes.
* **D** (Text file) is an external storage format, not a structure in memory.
#### Question 7
* **Correct Answer: C** (Existence checking)
* **Explanation:** Existence checking (or presence check) verifies that data has been entered into a mandatory field and that it is not left empty before submission.
* **Why others are incorrect:**
* **A** (Range checking) checks if a value falls between upper and lower numeric/character limits.
* **B** (Type checking) checks if the data matches the expected data type (e.g., integer vs. text).
* **D** (Overflow checking) checks if a value exceeds the storage capacity of the variable.
#### Question 8
* **Correct Answer: A** (Sitemap)
* **Explanation:** A Sitemap shows the hierarchical structure and navigation pathways between different pages, screens, or menus of an application.
* **Why others are incorrect:**
* **B** (IPO chart) documents the inputs, processes, and outputs of a system.
* **C** (Pseudocode) describes algorithm logic.
* **D** (Gantt chart) is a project management tool for monitoring timelines.
---
## Section B – Short Answer (16 Marks Total / Labeled 20)
### Question 1 (4 Marks)
**Explain how the data gathered from an interview differs from data gathered via a survey, and outline one distinct advantage of each method when determining user needs.**
#### Marking Criteria
* **2 Marks:** Clear comparison of the data types/methods (1 mark for describing interview data as qualitative, detailed, or conversational; 1 mark for describing survey data as structured, standardized, or quantitative).
* **1 Mark:** Valid advantage of using a survey to determine user needs.
* **1 Mark:** Valid advantage of using an interview to determine user needs.
#### Exemplar Answer
* **Difference:** Data from an interview is highly detailed, open-ended, and qualitative, allowing the developer to capture body language, tone, and unstructured personal opinions. Conversely, survey data is highly structured, standardized, and often quantitative (e.g., using rating scales or multiple-choice questions), collecting uniform answers from a wider audience.
* **Survey Advantage:** Surveys can be distributed to a large number of people quickly and cheaply, providing a broad overview of user needs and trends that are easy to analyze statistically.
* **Interview Advantage:** Interviews allow the developer to ask follow-up questions to clarify ambiguous points, probe deeply into specific user frustrations, and tailor questions to the individual user.
---
### Question 2 (4 Marks)
**For each error description, select the correct error type from the provided list:**
* `logic`
* `overflow`
* `index out of range`
* `type mismatch`
#### Marking Criteria
* **1 Mark** per correct error type selected.
#### Completed Grid
| Error Type | Description |
| :--- | :--- |
| **type mismatch** | A variable assigned to track the number of user logins receives a floating-point number instead of an expected integer. |
| **index out of range** | An iteration loop continues to increment its counter variable beyond the defined bounds of a one-dimensional array. |
| **logic** | The software executes without crashing but incorrectly calculates a 10% discount as a 100% discount due to an incorrect mathematical formula. |
| **overflow** | An integer variable exceeds its maximum allocated memory space because a loop generates a calculation value that is too large. |
---
### Question 3 (4 Marks)
**Write the pseudocode for a control structure routine that loops through the `dailySteps[]` array, counts how many days the user achieved 10,000 steps or more, and prints out the final total count.**
#### Marking Criteria
* **1 Mark:** Initializing a count variable to `0` before starting the loop.
* **1 Mark:** Correctly writing a loop structure that iterates exactly 7 times (matching the array indexes 1 to 7).
* **1 Mark:** Using a conditional check (`dailySteps[index] >= 10000`) and incrementing the count variable within the loop.
* **1 Mark:** Outputting/printing the final count variable after the loop terminates.
#### Exemplar Pseudocode (For Loop Approach)
```plaintext
BEGIN
Set count To 0
For index From 1 To 7 Do
If dailySteps[index] >= 10000 Then
Set count To count + 1
EndIf
EndFor
Print count
END
```
#### Alternative Exemplar Pseudocode (While Loop Approach)
```plaintext
BEGIN
Set count To 0
Set index To 1
While index <= 7 Do
If dailySteps[index] >= 10000 Then
count -> count + 1
EndIf
index -> index + 1
EndWhile
Print count
END
```
---
### Question 4 (4 Marks)
**Identify the unique operational difference between setting a breakpoint and using debugging output statements, explaining how each helps a developer isolate a logic flaw.**
#### Marking Criteria
* **2 Marks:** Clear explanation of the operational difference (1 mark for breakpoint behavior; 1 mark for debugging output statement behavior).
* **1 Mark:** Explanation of how breakpoints help isolate a logic flaw.
* **1 Mark:** Explanation of how debugging output statements help isolate a logic flaw.
#### Exemplar Answer
* **Operational Difference:** A breakpoint physically halts/pauses the execution of the program at a specific line of code within the IDE, allowing the developer to examine the active state of memory and variables. A debugging output statement (e.g., `print()` or `console.log()`) does not pause the program; it writes variables or flags to the output terminal dynamically while the program continues to execute.
* **Isolating with Breakpoints:** Once execution pauses at a breakpoint, the developer can step through the code line-by-line (using step-into/step-over) and inspect variable values in real-time. This reveals the exact moment a variable value changes incorrectly, isolating the faulty logic line.
* **Isolating with Output Statements:** Output statements provide a chronological trail of program execution (a log trace). This is useful for monitoring how variables change across multiple iterations of a loop or during complex function calls without interrupting user interactions or app flows.
---
## Section C – Case Study (18 Marks Total / Labeled 30)
### Question 2 (4 Marks)
**From the case study provided, identify one functional requirement, one non-functional requirement, and two design or operational constraints affecting the EcoTrack system.**
#### Marking Criteria
* **1 Mark:** Valid functional requirement identified from the case study.
* **1 Mark:** Valid non-functional requirement identified from the case study.
* **2 Marks:** Two distinct design or operational constraints identified from the case study (1 mark each).
#### Exemplar Answers
* **Functional Requirement (Identify any one):**
* The smart bin camera must capture an image when an item is dropped into the bin.
* The local machine learning script must check the captured image for sorting contaminants.
* The locking arm must temporarily lock the lid when a contaminant is detected.
* The bin must report fill levels, contamination alerts, and GPS coordinates back to the central server.
* The EcoBin App must allow residents to register (using name, address, year of birth) and show real-time bin levels, educational tips, and weekly EcoScores.
* The Council Route Dashboard must show logistics staff an interactive map of filled bins and calculate fuel-efficient paths for collection trucks.
* **Non-Functional Requirement (Identify any one):**
* **Performance:** The smart bin must report GPS coordinates and levels in *real-time*.
* **Power Efficiency:** The smart bin communication module must operate on *low-power*.
* **Usability:** The bin speaker must deliver a *polite* audio notification.
* **Physical Size:** The camera inside the lid must be *miniature*.
* **Constraints (Identify any two):**
* **Operational Constraint:** Automated collection trucks must only stop at bins that are at least 75% full.
* **Hardware/Power Constraint:** The bin electronics must be powered by a small solar panel on the lid, restricting power consumption.
* **Connectivity Constraint:** The system must use cellular networks to report data, limiting operational capacity to areas with cellular reception.
* **Development Constraint:** The developers must build the system using a low-code development platform mixed with an AI-based code generator.
* **Social/Legal Constraint:** The central server links household addresses directly with tracking data and biometric image logs, which must comply with local privacy legislation (e.g., Privacy Act 1988) due to resident privacy concerns.
---
### Question 3 (4 Marks)
**Identify and describe two separate design tools that the team should use to represent these different visual and functional components of the solution design.**
* **Tool 1 (App Appearance)**
* **Tool 2 (Lid Automation Logic)**
#### Marking Criteria
* **1 Mark:** Identifying a valid design tool for the app appearance.
* **1 Mark:** Describing how that tool represents the visual layout or user interface of the mobile app.
* **1 Mark:** Identifying a valid design tool for the lid automation logic.
* **1 Mark:** Describing how that tool represents the conditional flow, steps, or algorithm of the locking mechanism.
#### Exemplar Answers
* **Tool 1 (App Appearance): Mock-ups** (Acceptable: Storyboards, Layout diagrams, User Interface Wireframes)
* **Description:** Mock-ups are visual, static designs of the app screens. They show the placement of UI elements (buttons, input boxes, maps, text) and styling (colors, fonts, sizing), helping developers design a user-friendly layout for the registration page and real-time dashboard.
* **Tool 2 (Lid Automation Logic): Flowcharts** (Acceptable: Pseudocode, IPO charts, State Transition Diagrams)
* **Description:** A flowchart uses standardized geometric shapes (rectangles for actions, diamonds for decisions) connected by arrows to illustrate the step-by-step logical sequence of the locking mechanism. It clearly charts decision points, such as what happens if the ML script flags a contaminant (lock lid and play audio) versus when no contaminant is found (remain unlocked).
---
### Question 4 (6 Marks)
**Complete the test table to design a validation testing plan for this birth year input field. Select appropriate validation test values that include boundary data and invalid data, and outline the expected software behavior.**
#### Boundary & Calculation Reference
* **Current Year:** 2026
* **Minimum Age:** 13 years old $\rightarrow$ Birth Year must be $\le 2013$ ($2026 - 13 = 2013$).
* **Maximum Age:** 110 years old $\rightarrow$ Birth Year must be $\ge 1916$ ($2026 - 110 = 1916$).
* **Valid Range:** $1916 \le \text{Birth Year} \le 2013$ (Inclusive)
#### Marking Criteria
* **4 Marks:** Valid test data values for Test 2, 3, 4, and 5 (1 mark each).
* Boundary test values must target the calculation boundaries (1916 and 2013) or their outer bounds (1915 and 2014).
* Invalid test values must target out-of-range years or incorrect data types.
* **2 Marks:** Correct expected outcome / software actions (1 mark for boundary outcomes, 1 mark for invalid outcomes).
#### Completed Test Table
| Test No. | Test Data Value | Type of Test Data | Expected Outcome / Software Action |
| :---: | :---: | :---: | :--- |
| **1** | `2010` | Valid Data | Input accepted; registration continues. |
| **2** | `2013` | Boundary Data | **Input accepted; registration continues.** *(Checks upper bound of range, age 13)* |
| **3** | `1916` | Boundary Data | **Input accepted; registration continues.** *(Checks lower bound of range, age 110)* |
| **4** | `2014` *(or `2018`)* | Invalid Data | **Input rejected; display error message** (e.g., *"Must be 13 years or older to register"*). |
| **5** | `"abc"` *(or `1915`, `2027`)* | Invalid Data | **Input rejected; display error message** (e.g., *"Please enter a valid four-digit birth year"*). |
> [!TIP]
> **Alternative Acceptable Boundary Tests:**
> Teachers may accept boundary tests that check the *immediate outer bounds* of the valid range:
> * Test Data: `2014` (Boundary Data) $\rightarrow$ Expected Outcome: `Input rejected; display error message (User under 13).`
> * Test Data: `1915` (Boundary Data) $\rightarrow$ Expected Outcome: `Input rejected; display error message (User over 110).`
---
### Question 5 (4 Marks)
**When an automated collection truck empties a smart bin, the event data is bundled into a structured packet and transmitted to the database. The attributes transmitted for a single event are: BinID (e.g., "BIN-9941"), WeightDelta (e.g., 14.5 kg), IsContaminated (e.g., True), CollectionTime (e.g., "06:45 AM").**
**a. Identify the most appropriate data structure to store this cluster of varying data types for a single collection event. Justify your selection. (2 Marks)**
#### Marking Criteria (Part a)
* **1 Mark:** Correctly identifying **Record** (or acceptable alternatives: Class, Object, Dictionary, Struct).
* **1 Mark:** Justifying the choice by referencing the need to group *different (heterogeneous) data types* under named fields representing a single entity (the event).
#### Exemplar Answer (Part a)
* **Data Structure:** Record
* **Justification:** A record allows a collection of related variables with different data types (e.g., string for `BinID`, float/real for `WeightDelta`, Boolean for `IsContaminated`, and string for `CollectionTime`) to be grouped together under a single entity. The attributes can then be easily accessed using named fields (e.g., `event.BinID`).
* *Note: An array is incorrect as it only stores items of the same data type.*
**b. State the exact data type that should be allocated to the `IsContaminated` attribute and the `WeightDelta` attribute respectively. (2 Marks)**
#### Marking Criteria (Part b)
* **1 Mark:** Correct data type for `IsContaminated` (**Boolean**).
* **1 Mark:** Correct data type for `WeightDelta` (**Real**, **Float**, **Floating-point**, or **Decimal**; do *not* accept Integer).
#### Exemplar Answer (Part b)
* **IsContaminated Data Type:** Boolean
* **WeightDelta Data Type:** Real *(or Float)*