Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "queries.h"
using namespace std;
void insertLecturer(){
int LecturerID;
string LecturerName;
cout<< "Insert Lecturer Name"<<endl;
cin>>LecturerName;
cout<< "Insert Lecturer ID"<<endl;
cin>>LecturerID;
InsertLecturer(LecturerID, LecturerName);
}
void insertStudent(){
int StudentID;
string Name;
cout<< "Insert Student Name"<<endl;
cin>>name;
cout<< "Insert Student ID"<<endl;
cin>>stu_id;
InsertStudent(StudentID, Name);
}
int main(){
int input=0;
int ID;
cout << "Timetable Database" << endl;
while(true){
cout << "To add a lecturer, enter 1\n
To add a student, enter 2\n
To show student list, enter 3\n
To show lecturer list, enter 4\n
To view the module room, enter 5\n" << endl;
cin >> input;
switch (input){
case 1:
insertLecturer();
break;
case 2:
insertStudent();
break;
case 3:
showStudents();
break;
case 4:
showLecturers();
break;
case 5:
cout << "Enter module ID" << endl;
cin >> ID;
showModuleRoom(ID);
break;
default:
cout << "Wrong command, try again" << endl;
return 0;
}
return 1;
}
}