Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- ///////////////////////////////////////////
- class UProgram { //University program
- class Degree { // Degree
- class Course { //Course
- char studentArray[3];
- class Teacher { //Teacher
- private:
- std::string lastName;
- std::string firstName;
- int age;
- std::string Address;
- std::string City;
- int phone;
- public:
- Teacher(); //constructor
- Teacher(std::string lastName, std::string firstName, int age, std::string Address, std::string City, int phone);
- ~Teacher(); // Destructor
- void SitInClass() {
- std::cout << "Sitting at front of class" << std::endl;
- } //Sit in class
- void GradeStudent() { //grade student
- std::cout << "Student graded" << std::endl;
- }
- };
- class Student { //Student
- private:
- std::string lastName;
- std::string firstName;
- int age;
- std::string Address;
- std::string City;
- int phone;
- public:
- Student(); //constructor
- Student(std::string lastName, std::string firstName, int age, std::string Address, std::string City, int phone);
- ~Student(); // Destructor
- void SitInClass();
- };
- };
- };
- };
- //end of classes
- void UProgram::Degree::Course::Student::SitInClass() {
- std::cout << "Sitting at front of class" << std::endl;
- } //Sit in class
- int main() {
- Student student1;
- student1.lastName = "Joey";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement