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 "functions.h"
using namespace std;
void Lecturer_upload(){
int lecturer_number;
string Lecturer_name, Lecturer_id;
cout<< "Enter Lecturer's name"<<endl;
cin>>Lecturer_name;
cout<< "Enter ID"<<endl;
cin>>Lecturer_id;
cout<< "Enter the lecturer's phone number"<<endl;
cin>>lecturer_number;
AddNewLecturers(Lecturer_id, Lecturer_name, lecturer_number);
}
void student_upload(){
int student_number,student_id;
string student_name;
cout<< "Enter student's name"<<endl;
cin>>student_name;
cout<< "Enter ID"<<endl;
cin>>student_id;
cout<< "Enter phone number"<<endl;
cin>> student_number;
AddNewStudents(student_id, student_name, student_number);
}
int main(){
int press=0;
int code;
cout<< "Welcome to University timetable system."<<endl;
cout<< "To look at the lecturers list, press 1\n To look at the students list, press 2 \n If you would like to upload the details of a new lecturer, press 3 then press enter\n If you want to upload details of a student, press 4\n If you want to look for a lecturer a module, press 5 \n To exit, press 6"<<endl;
cin>>press;
if (press==1){
showAllLecturers();
}
else if (press==2){
showAllStudents();
}
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;
Search_for_lect(code);
}
else if (press==6){
return 0;
}
else {
cout<< "Invalid input entered"<<endl;
return 0;
}
return 1;
}