Tier 1 Series 2

2G: The Logic Exam

Capstone Exam
Pilot Record
Student Profile
"Your training in Series 2 has focused on the movement and storage of data. A pilot doesn't just need to know which button to press; they must understand the current flowing through the switchboard.

In this exam, you are the Lead Auditor. You will be presented with a high-level "Fuel Management System" script that is riddled with logic stutters, memory leaks, and side effects."

Target Asset for Audit

FRAGILE_CODE_DETECTED
// UNIT AUDIT #202: FuelManager.cs
public class FuelManager : MonoBehaviour {
    public static List<object> fuelLogs = new List<object>(); // Memory Leak?

    public void ProcessAllTanks() {
        foreach(var log in fuelLogs) { 
            if ((float)log <= 0) { 
                fuelLogs.Remove(log); // CRASH POINT
            }
        }
    }
}

Supervisor's Certification

Authenticated Pilot
pilot_2736af73982ea2d9
Session Secure

Failure Point #1

Logic Flattening (Lesson 2A)

Convert deep nested if chains into high-speed Switch Expressions.

Failure Point #2

Memory Integrity (Lesson 2B)

Identify and eliminate "Boxing" and dynamic list re-allocations.

Failure Point #3

Loop Stability (Lesson 2C)

Fix the "Scan Crash" caused by modifying collections mid-iteration.