{"id":23339771,"url":"https://github.com/andresilvase/school-system","last_synced_at":"2026-04-17T07:31:49.516Z","repository":{"id":264070138,"uuid":"892267791","full_name":"andresilvase/school-system","owner":"andresilvase","description":"A simple CLI Application mocking a Student Management System using Go","archived":false,"fork":false,"pushed_at":"2024-12-11T22:24:04.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T11:44:07.832Z","etag":null,"topics":["cli","cli-app","client-server","crud","crud-api","crud-application","docker","docker-compose","docker-container","docker-file","docker-image","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andresilvase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-21T19:53:34.000Z","updated_at":"2024-12-11T22:24:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d006190-2dd3-42a6-94e4-34f674b3129f","html_url":"https://github.com/andresilvase/school-system","commit_stats":null,"previous_names":["andredrummer/school-system","andresilvase/school-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andresilvase/school-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilvase%2Fschool-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilvase%2Fschool-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilvase%2Fschool-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilvase%2Fschool-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andresilvase","download_url":"https://codeload.github.com/andresilvase/school-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresilvase%2Fschool-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31919908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cli-app","client-server","crud","crud-api","crud-application","docker","docker-compose","docker-container","docker-file","docker-image","go","golang"],"created_at":"2024-12-21T04:14:52.587Z","updated_at":"2026-04-17T07:31:49.472Z","avatar_url":"https://github.com/andresilvase.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# School System\n\n[Server API](https://github.com/AndreDrummer/school-system-api)\n[Docker Image](https://hub.docker.com/repository/docker/asfsengineer/ssapi)\n\nCreating a simple Student Management System using Go. The program will allow users to add students, remove students, and display a list of students, including their grades, average scores, and whether they passed or failed based on a minimum average.\n\n### **Requirements:**\n\n1. **Define a `Student` struct**:\n   - Each `Student` should have the following properties:\n     - `Name` (string)\n     - `Grades` (slice of integers)\n\n2. **Create a map to store the students**:\n   - Use a map with the `Name` of the student as the key and the `Student` struct as the value.\n\n3. **Functions**:\n   - Create a function `addStudent(name string)` that adds a new student with no grades to the map.\n   - Create a function `addGrade(name string, grade int)` that adds a grade to the student’s list of grades.\n   - Create a function `removeStudent(name string)` that removes a student by name from the map.\n   - Create a function `calculateAverage(name string)` that calculates and returns the average of the student’s grades.\n   - Create a function `checkPassOrFail(name string)` that returns if the student passed or failed. The passing average is 60.\n\n4. **Main Menu**:\n   - In the `main` function, create a menu with the following options:\n     - `1` - Add a new student.\n     - `2` - Add a grade to a student.\n     - `3` - Remove a student.\n     - `4` - Calculate and display the average score of a student.\n     - `5` - Display whether a student passed or failed.\n     - `6` - Display all students and their grades.\n     - `0` - Exit the program.\n\n5. **Bonus**:\n   - Allow users to input multiple grades at once when adding grades.\n   - Add input validation for names and grades (e.g., a grade should be between 0 and 100).\n\n6. **Extra**:\n   - Communicate via API\n     - There is another project called [school-system-api](https://github.com/AndreDrummer/school-system-api) that is the server counterpart of this one. All the operations are available to be made via REST.\n   - Keep a local database to diminish the requests to the server.\n\n---\n\n### **Example interaction**:\n\n```\nWelcome to the Student Management System!\n1 - Add a new student\n2 - Add a grade to a student\n3 - Remove a student\n4 - Calculate average score of a student\n5 - Check if a student passed or failed\n6 - Display all students and their grades\n0 - Exit\n\nEnter your choice: 1\nEnter student's name: Alice\nStudent Alice added!\n\nEnter your choice: 2\nEnter student's name: Alice\nEnter grade: 85\nGrade 85 added to Alice!\n\nEnter your choice: 4\nEnter student's name: Alice\nAlice's average score: 85.0\n\nEnter your choice: 5\nEnter student's name: Alice\nAlice passed!\n\nEnter your choice: 6\nList of students:\n- Alice: [85]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresilvase%2Fschool-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandresilvase%2Fschool-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresilvase%2Fschool-system/lists"}