Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- using namespace std;
- class Human {
- public:
- string name;
- int age;
- int number;
- char gender;
- Human();
- Human(string newName, int newAge, int newNumber, char newGender) {
- name = newName;
- age = newAge;
- number = newNumber;
- gender = newGender;
- }
- virtual void print(){
- cout << "Name: " << name << endl;
- cout << "Age: " << age << endl;
- cout << "Number: " << number << endl;
- cout << "Gender: " << gender << endl;
- };
- virtual ~Human();
- };
- class Student : public Human{
- public:
- int course;
- string university;
- string faculty;
- Student(int newCourse, string newUniversity, string newFaculty) {
- course = newCourse;
- university = newUniversity;
- faculty = newFaculty;
- }
- virtual ~Student();
- };
- class FatherFamily : public Human {
- public:
- FatherFamily();
- Human *Wife;
- int countChildren;
- Human *count;
- void addChild() {
- }
- virtual ~FatherFamily();
- };
- class StudentFatherFamily : public Student, public FatherFamily {
- public:
- StudentFatherFamily();
- virtual ~StudentFatherFamily();
- };
- int main() {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement