diff --git a/problems/minigrades/SPEC-v2.txt b/problems/minigrades/SPEC-v2.txt index e69de29b..187cb841 100644 --- a/problems/minigrades/SPEC-v2.txt +++ b/problems/minigrades/SPEC-v2.txt @@ -0,0 +1,7 @@ +The system is updated with full CRUD functionality and enhanced data tracking. +Contributor: M-YEMIN MEVALDI (9251478112) + +CHANGES FROM V1: +1. Data Format: Each record follows 'id|student_name|grade|date'. +2. Date: System automatically appends current date (YYYY-MM-DD). +3. ID Logic: ID is calculated as 'highest_existing_id + 1'. diff --git a/problems/minigrades/problem.json b/problems/minigrades/problem.json index e69de29b..32f25d3b 100644 --- a/problems/minigrades/problem.json +++ b/problems/minigrades/problem.json @@ -0,0 +1,7 @@ +{ + "name": "minigrades", + "contributor_id": "9251478112", + "contributor_name": "M-YEMIN MEVALDI", + "description": "Student grade management system with auto-increment IDs, date tracking, and CRUD operations.", + "commands": ["init", "add", "list", "update", "delete"] +} diff --git a/problems/minigrades/test-v1.sh b/problems/minigrades/test-v1.sh index e69de29b..fa6b4377 100644 --- a/problems/minigrades/test-v1.sh +++ b/problems/minigrades/test-v1.sh @@ -0,0 +1,9 @@ +#!/bin/bash +python3 minigrades.py init > /dev/null +ADD_OUT=$(python3 minigrades.py add "Ahmet" "80") +if [[ "$ADD_OUT" == *"Added grade #1 for Ahmet"* ]]; then + echo "✅ V1: Success." +else + echo "❌ V1: Failed." + exit 1 +fi diff --git a/problems/minigrades/test-v2.sh b/problems/minigrades/test-v2.sh index e69de29b..a25aad39 100644 --- a/problems/minigrades/test-v2.sh +++ b/problems/minigrades/test-v2.sh @@ -0,0 +1,9 @@ +#!/bin/bash +python3 minigrades.py init > /dev/null +python3 minigrades.py add "Yemin" "100" > /dev/null +if python3 minigrades.py list | grep -q "Yemin"; then + echo "✅ V2: Success." +else + echo "❌ V2: Failed." + exit 1 +fi