Answer to Question #318959 in C++ for zizou

Question #318959


write the class graduating student as a subclass of the student class


1
Expert's answer
2022-03-28T17:44:22-0400
#include <iostream>
using namespace std;


class Student
{
public:


	Student(){}


	Student(string firstName, string lastName)
	{
		this->FirstName = firstName;
		this->LastName = lastName;
	}


	void setFirstName(string name)
	{
		this->FirstName = name;
	}


	void setLastName(string name)
	{
		this->LastName = name;
	}


	void setCource(string cource)
	{
		this->Cource = cource;
	}


	void setUnivercityYear(int univercityYear)
	{
		this->UniversityYear = univercityYear;
	}


	string getFirstName()
	{
		return this->FirstName;
	}


	string getLastName()
	{
		return this->LastName;
	}


	string getCource()
	{
		return this->Cource;
	}


	int getUnivercityYear()
	{
		return this->UniversityYear;
	}


private:
	string FirstName;
	string LastName;
	string Cource;
	int UniversityYear;
};


class GraduatingStudent : Student
{
public:
	GraduatingStudent(Student student)
	{
		this->Student = student;
	}


	void setQualificationWork(string cvalificationWork)
	{
		this->QualificationWork = cvalificationWork;
	}


	void setIDDiploma(int id)
	{
		cout << "You have successfully completed your studies";
		this->IDDiploma = id;
	}


	string getQualificationWork()
	{
		return this->QualificationWork;
	}


	int getIDDiploma() {
		return this->IDDiploma;
	}

private:
	string QualificationWork;
	int IDDiploma;
	Student Student;
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

zizou
29.03.22, 11:50

Thank you for helping me

Leave a comment

LATEST TUTORIALS
New on Blog