#include <iostream>
#include <cstring>

using namespace std;

class Person
{
public:
    string ID;
    string name;
    string surname;
    string department;
    string email;

public:
    //get and set functions for ID, Name, Surname, Department, Email properties
    string getID()
    {
        return this->ID;
    };

    void setID(string _ID)
    {
        this->ID = _ID;
    };

    string getName()
    {
        return this->name;
    };

    void setName(string _name)
    {
        this->name = _name;
    };

    string getSurname()
    {
        return this->surname;
    };

    void setSurname(string _surname)
    {
        this->surname = _surname;
    };

    string getDepartment()
    {
        return this->department;
    };

    void setDepartment(string _department)
    {
        this->department = _department;
    };

    string getEmail()
    {
        return this->email;
    };

    void setEmail(string _email)
    {
        this->email = _email;
    };
};

//inherit Student class from Person class
class Student :public Person
{
private:
	static int student_counter;
	static Student _S[100];

public:
	//constructor
	Student()
	{
	};

	Student(string id, string Name, string Surname, string Department, string Email)
	{
		setID(id);
		setName(Name);
		setSurname(Surname);
		setDepartment(Department);
		setEmail(Email);
	}

	//student add 
	static void addStudent(string id, string Name, string Surname, string Department, string Email)
	{
		if (student_counter >= 100)
		{
			cout << "cant add more students";
		}
		else
		{
			Student newS;
			newS.setID(id);
			newS.setName(Name);
			newS.setSurname(Surname);
			newS.setDepartment(Department);
			newS.setEmail(Email);
			_S[student_counter] = newS;
			student_counter++;
		}
	}

	//display students
	static void display()
	{
		for (int i = 0; i < student_counter; i++)
		{
			cout << _S[i].getID() << " - ";
		}
	}
};

int Student::student_counter = 0;
Student Student::_S[100];

int main()
{
    Student::addStudent("ST123456", "Ege", "Inan", "CS", "ege @ gmail.com");
    Student::display();
}