0% found this document useful (0 votes)
2 views4 pages

Prog

The document is a C++ program that allows users to input a day, class, section, and period to retrieve and display class schedule information. It uses a multi-dimensional array to store details about various classes and lectures, including the instructor and location. The program also provides an option to view subsequent periods for the selected class and section.

Uploaded by

basharashraf999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Prog

The document is a C++ program that allows users to input a day, class, section, and period to retrieve and display class schedule information. It uses a multi-dimensional array to store details about various classes and lectures, including the instructor and location. The program also provides an option to view subsequent periods for the selected class and section.

Uploaded by

basharashraf999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

#include <iostream>

#include <iomanip>
using namespace std;
class table{
private:
string data;
public :
void setdata(string x)
{
data=x;
}
void showdata() // member function
{
cout << data<< endl;
}
};

int main()
{ int day , clas , sec , per ;

cout<< "enter the day \n ";


cout<< "for sun mon tues wedn thur\n";
cout<< "enter: 1 2 3 4 5 \n";
cin >> day;

cout<< "enter your class\n"; // ‫رقم الدفعه‬


cin >> clas;

if (clas==2)
{
cout<< "enter sec 1,2,3or4 \n";
cin >> sec;
cout<< "enter the period\n";
cin >> per;
string second[6][5][5];
second[1][1][1]={"Section: Mechanics of Mechanics \nEng:mahmoud essam\
nplace:M320\\n "};
second[1][2][1]={"Section: Mechanics of Mechanics \nEng:al-hosseini mohammed \
nplace:M321\n "};
second[1][3][1]={"Section: computer lab\nEng:ahmed gamal \nplace:stud.lab \
n"};
second[1][4][1]={"Section: fluid \nEng:aly mortada \nplace:F309 \n"};

second[1][1][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n "};


second[1][2][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n "};
second[1][3][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n"};
second[1][4][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n"};

second[1][1][3]={"Lecture:metal catting \nprof:ibrahim mohammed \nplace:M320 \n


"};
second[1][2][3]={"Lecture:metal catting \nprof:ibrahim mohammed \nplace:M320 \n
"};
second[1][3][3]={"Lecture:metal catting \nprof:ibrahim mohammed \nplace:M320 \n
"};
second[1][4][3]={"Lecture:metal catting \nprof:ibrahim mohammed \nplace:M320 \n
"};

second[1][1][4]={"free:)"};
second[1][2][4]={"Section: computer lab\nEng:ahmed hesham \nplace:stud.lab \
n"};
second[1][3][4]={"Section: metal catting \nEng:hend abd-elhafiz \nplace: M320\
n"};
second[1][4][4]={"Section: metal catting \nEng:reda mohammed \nplace: M320\
n"};

second[2][1][1]={"Lecture: c++ \n Dr.Abdel-hady \nplace:M320 \n "};


second[2][2][1]={"Lecture: c++ \n Dr.Abdel-hady \nplace:M320 \n "};
second[2][3][1]={"Lecture: c++ \n Dr.Abdel-hady \nplace:M320 \n "};
second[2][4][1]={"Lecture: c++ \n Dr.Abdel-hady \nplace:M320 \n "};

second[2][1][2]={"Lecture: design\n Dr.mohammed emad \nplace:M320 \n "};


second[2][2][2]={"Lecture: design\n Dr.mohammed emad \nplace:M320 \n "};
second[2][3][2]={"Lecture: design\n Dr.mohammed emad \nplace:M320 \n "};
second[2][4][2]={"Lecture: design\n Dr.mohammed emad \nplace:M320 \n "};

second[2][1][3]={"Section: computer lab\nEng:ahmed hesham \nplace:stud.lab \


n"};
second[2][2][3]={"Section: fluid \nEng:ahmed samir \nplace:M320 \n"};
second[2][3][3]={"Section: design \nEng:al-hussin mohammed \nplace:sala
east \n"};
second[2][4][3]={"Section: design \nEng:al-hussin mohammed \nplace:sala
east \n"};

second[2][1][4]={"Section: design \nEng:al-hussin mohammed \nplace:sala


east \n"};
second[2][2][4]={"Section: design \nEng:al-hussin mohammed \nplace:sala
east \n"};
second[2][3][4]={"Section: fluid \nEng:ahmed samir \nplace:F320 \n"};
second[2][4][4]={"Section: computer lab\nEng:ahmed gamal \nplace:stud.lab \
n"};

second[3][1][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\


nplace:M320\\n "};
second[3][2][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\
nplace:M320\\n "};
second[3][3][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\
nplace:M320\\n "};
second[3][4][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\
nplace:M320\\n "};

second[3][1][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n"};


second[3][2][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n"};
second[3][3][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n"};
second[3][4][2]={"Lecture: fluid \n Dr.Othman abo-akrab \nplace:M320 \n"};

second[3][1][3]={"students activities \n"};


second[3][2][3]={"students activities \n"};
second[3][3][3]={"students activities \n"};
second[3][4][3]={"students activities \n"};

second[3][1][4]={"free \n"};
second[3][2][4]={"free \n"};
second[3][3][4]={"free \n"};
second[3][4][4]={"free \n"};

second[4][1][1]={"Section: fluid \nEng:aly mortada \nplace:F309 \n"};


second[4][2][1]={"free\n"};
second[4][3][1]={"Section: thermo \nEng:ahmmed abdou \nplace:M320 \n"};
second[4][4][1]={"Section: thermo \nEng:ahmmed abdou \nplace:M320 \n"};

second[4][1][2]={"Lecture: thermo \n Dr.nassib \nplace:M320 \n"};


second[4][2][2]={"Lecture: thermo \n Dr.nassib \nplace:M320 \n"};
second[4][3][2]={"Lecture: thermo \n Dr.nassib \nplace:M320 \n"};
second[4][4][2]={"Lecture: thermo \n Dr.nassib \nplace:M320 \n"};

second[4][1][3]={"Section: thermo \nEng:taha \nplace:M321 \n"};


second[4][2][3]={"Section: thermo \nEng:taha \nplace:M321 \n"};
second[4][3][3]={"Section: Mechanics of Mechanics \nEng:hani \nplace:M320\n
"};
second[4][4][3]={"Section: Mechanics of Mechanics \nEng:hani \nplace:M320\n
"};

second[4][1][4]={"humanitarian and cultural lec.\n "};


second[4][2][4]={"humanitarian and cultural lec.\n "};
second[4][3][4]={"humanitarian and cultural lec.\n "};
second[4][4][4]={"humanitarian and cultural lec.\n "};

second[5][1][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\


nplace:M320\\n "};
second[5][2][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\
nplace:M320\\n "};
second[5][3][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\
nplace:M320\\n "};
second[5][4][1]={"Lecture:Mechanics of Mechanics \nDr.othman hassn\
nplace:M320\\n "};

second[5][1][2]={"Section: metal catting \nEng:reda mohammed \nplace: M320\


n"};
second[5][2][2]={"Section: metal catting \nEng:hend \nplace: M320\n"};
second[5][3][2]={"free\n"};
second[5][4][2]={"free\n"};

second[5][1][3]={"free\n"};
second[5][2][3]={"free\n"};
second[5][3][3]={"free\n"};
second[5][4][3]={"free\n"};

second[5][1][4]={"free\n"};
second[5][2][4]={"free\n"};
second[5][3][4]={"free\n"};
second[5][4][4]={"free\n"};
table d1 ;
d1.setdata(second [day][sec][per]);
d1.showdata();
char agg='c';

cout <<"want to know next?y/n\n";

int i=1; while (agg!='n')


{cin >>agg;
d1.setdata(second [day][sec][per+i++]);
d1.showdata();
if (i==3)break;
}

}
return 0;
}

You might also like