Skip to main content

Exam Environment Explanation

Read Me

If you are unsure how to use the exam environment, please read this guide.

1. Exam Setup & Directory Structure​

When you log in to the exam environment, your starter project is located in your home directory:

cd ~/sample-exam-set-b

Inside this directory, you will find:

  • app/ — Contains the Java source files (src/main/java/) and JUnit tests (src/test/java/).
  • gradlew / gradlew.bat — Gradle wrapper scripts for compiling and running tests.
  • mcq.txt — File to record your answers for Section 1 (Multiple Choice).
  • q09.txt through q13.txt — Answer files for Section 2 (Short Answer).
  • q16.txt, q17.txt, and q18.md — Answer files for Section 4 (Architecture & Diagrams).

2. Compiling and Testing Code​

Compiling​

Your Java code must compile without errors. Run:

./gradlew compile

You should see BUILD SUCCESSFUL. If compilation fails, check for missing imports, syntax errors, or incompatible method signatures.

Running Tests​

To run the automated tests:

./gradlew test

To run a specific test class:

./gradlew test --tests q15.ParcelSystemTest

3. Submitting and Checking Answers​

The exam environment provides dedicated CLI tools to submit and verify your answers.

Submitting a Question​

2511 submit <question_number>

Example for MCQ 1:

2511 submit 1

Example for Question 14:

2511 submit 14

Checking Your Submissions​

To list all answers submitted so far:

2511 check

To view the submitted answer for a specific question:

2511 check <question_number>
Final Submission Notice

You can submit as many times as you like before the exam ends. Only your latest submission will be marked.


4. Mermaid Sequence Diagrams​

Question 18 requires you to author a sequence diagram using Mermaid syntax in q18.md.

Authoring Mermaid Syntax​

In q18.md, wrap your diagram in a mermaid code fence:

```mermaid
sequenceDiagram
autonumber
actor Student
participant Portal as Submission Portal
participant Service as Submission Service

Student->>Portal: Upload submission
Portal->>Service: Submit request
Service-->>Portal: Confirmation
Portal-->>Student: Done
```

Previewing Diagrams in VS Code​

  1. Open the Markdown file q18.md in VS Code.
  2. Press Ctrl + Shift + V (or Cmd + Shift + V on macOS) to open the Markdown Preview.
  3. The Mermaid extension will automatically render the sequence diagram interactively.
  4. For comprehensive syntax help, check the Mermaid Sequence Diagram Docs.