Projects Inventory

Student Database Management System Gaming Project in C++

Explanation:

  1. Student Class:
    • Represents a student with name and age.
    • display() const: Displays the student’s details.
  2. StudentDatabase Class:
    • Manages student records using an unordered map (std::unordered_map).
    • addStudent(const std::string& id, const std::string& name, int age)
      Advertisement
      : Adds a new student if the ID does not already exist.
    • viewStudent(const std::string& id) const: Displays the details of a student based on their ID.
    • deleteStudent(const std::string& id): Deletes a student record by ID if it exists.
  3. main Function:
    • Demonstrates adding students, viewing their details, deleting a student, and attempting to view the details of a deleted student.
    • Advertisement

Compilation:

To compile the program, use:

Run the program with:

 

Exit mobile version