Skip to content
Permalink
Browse files
Create Timetable system
  • Loading branch information
badeshac committed Aug 19, 2019
0 parents commit bf6f672e2dcadaf517e7d8ea88fc1cb9680b2fad
Showing 1 changed file with 137 additions and 0 deletions.
@@ -0,0 +1,137 @@
#include <iostream>

#include <string>

#include <sstream>



using namespace std;



void CreateMenu(void)

//Display user menus

{

cout << "Options available:" << endl;

cout << "1. Find class by time" << endl;

cout << "2. Find class by room" << endl;

cout << "3. Find class by lecturer" << endl;

cout << "9. Exit" << endl;

cout << "Enter option 1 or 2 or 3:";

}



bool ListClassbyTime(void)

{

cout << "class by time" << endl;

CreateMenu();

return true;

}



bool ListRooms(void)

{

cout << "class by room" << endl;

CreateMenu();

return true;

}



bool ListLecturers(void)

{

cout << "class by lecturer" << endl;

CreateMenu();

return true;

}



void main(void)

{

string option;

bool loopprompt = true;



//Display options to the user to select

CreateMenu();

while (loopprompt)

{

cin >> option;

switch (stoi(option))

{

case 1:

ListClassbyTime();

break;

case 2:

ListRooms();

break;

case 3:

ListLecturers();

break;

case 9:

cout << "Exit" << endl;

loopprompt = false;

default:

if (loopprompt)

cout << "Choose option 1-3 or 9" << endl;

break;

}

}

}

0 comments on commit bf6f672

Please sign in to comment.