Grade Calculator โ Testable calculation engine
Role: Frontend engineer ยท Stack: HTML/CSS/Vanilla JS
Problem
Create a mobile-first CGPA calculator with scenario simulation, correct numeric handling and edge-case safety. Low bundle size and wide compatibility were priorities.
Solution
Implemented a pure calculation core (normalizeGrades, weightedAggregate, simulateScenario) separated from UI. Accessible forms, inline validation and progressive disclosure for advanced options. Kept implementation framework-free for portability and speed.
Engine notes
Separation of concerns enabled unit-testing of the logic. Carefully validated boundary cases and normalized inputs to avoid rounding errors.
Outcome
Production-ready static page used in demos; demonstrates clear engineering practice: testable logic, accessibility, and performance-first delivery.