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 "header.h"
using namespace std;
void Lecturer_upload(){
int Lecturer_id,lecturer_number;
string Lecturer_name;
cout<< "enter lecturer name"<<endl;
cin>>Lecturer_name;
cout<< "enter lecturer id"<<endl;
cin>>Lecturer_id;
cout<< "enter lecturer number"<<endl;
cin>>lecturer_number;
NewLecturers(Lecturer_id, Lecturer_name, lecturer_number);
}
void student_upload(){
int student_number,student_id;
string student_name;
cout<< "enter student name"<<endl;
cin>>student_name;
cout<< "enter student id"<<endl;
cin>>student_id;
cout<< "enter phone number"<<endl;
cin>> student_number;
NewStudents(student_id, student_name, student_number);
}
int main(){
int press=0;
int code;
cout<< "Hello and welcome to the University TimeTable database system."<<endl;
while(true){
cout<< " If you would like to look at the students' list, press 1 then press enter\n If you would like to have a look at the Lecturers' list, press 2 then press enter\n If you would like to upload the details of a new lecturer, press 3 then press enter\n If you would like to upload the details of a new student, press 4 then press enter\n If you would like to look for a lecturer teaching any particular module, press 5 then press enter\n If you would like to exit this program, please press 6 then press enter."<<endl;
cin>>press;
if (press==1){
displayStudents();
}
else if (press==2){
displayLecturers();
}
else if (press==3){
Lecturer_upload();
}
else if (press==4){
student_upload();
}
else if (press==5){
cout<< "Please enter the module code to look for the lecturer"<<endl;
cin>>code;
SearchLect(code);
}
else if (press==6){
return 0;
}
else {
cout<< "Invalid input entered"<<endl;
return 0;
}
return 1;
}
}