oop Complex Engineering problem (1)
oop Complex Engineering problem (1)
Group Members: -
Muhammad Hasham (190453)
Inshal (190415)
Abdul Rasheed (190419)
class Members {
private:
int mem_id;
string name;
string address;
string department;
string contact_no;
public:
Members() {
mem_id = 0;
name = "";
address = "";
department = "";
contact_no = "";
}
void set_Members(int m, string n, string a, string d, string c) {
mem_id = m;
name = n;
address = a;
department = d;
contact_no = c;
void setNullMember() {
mem_id = 0;
name = "";
address = "";
department = "";
contact_no = "";
}
int get_memberid() {
return mem_id;
}
string get_name() {
return name;
}
string get_address() {
return address;
}
string get_dept() {
return department;
}
string get_contact() {
return contact_no;
}
};
class Events {
private:
string event_name;
string event_date;
public:
Events() {
event_name = "";
event_date = "";
}
void set_Events(string en, string ed) {
event_name = en;
event_date = ed;
}
void setNullEvents() {
event_name = "";
event_date = "";
}
string get_eventName() {
return event_name;
}
string get_eventDate() {
return event_date;
}
};
int main() {
Events event[100];
Members mem[100];
char main_inp;
int loop = 0;
int x, y, z;
string j, k;
int member_count = 0;
int event_count = 0;
int i = 0;
int member_id;
string mem_name, mem_add, mem_department, mem_contact;
else if (x == 4) {
cout << "Members are:\n" << endl;
do {
cout << "Member ID: " << mem[i].get_memberid() << endl;
cout << "Member Name: " << mem[i].get_name() << endl;
cout << "Member Address: " << mem[i].get_address() << endl;
cout << "Member Department: " << mem[i].get_dept() << endl;
cout << "Member Contact: " << mem[i].get_contact() << endl;
if (z == 1) {
cout << "Enter new name: " << endl;
cin >> mem_name;
mem[i].set_name(mem_name);
}
else if (z == 2) {
cout << "Enter new address: " << endl;
cin >> mem_add;
mem[i].set_address(mem_add);
}
else if (z == 3) {
cout << "Enter new department: " << endl;
cin >> mem_department;
mem[i].set_dept(mem_department);
}
else if (z == 4) {
cout << "Enter new contact_no: " << endl;
cin >> mem_contact;
mem[i].set_contact(mem_contact);
}
cout << "New info of member: " << endl;
cout << "Member ID: " << mem[i].get_memberid() << endl;
cout << "Member Name: " << mem[i].get_name() << endl;
cout << "Member Address: " << mem[i].get_address() << endl;
cout << "Member Department: " << mem[i].get_dept() << endl;
cout << "Member Contact: " << mem[i].get_contact() << endl;
event[event_count].set_Events(e_name, e_date);
event_count++;
}
else if (x == 2) {
cout << "Events are:\n" << endl;
do{
do{
if (event[i].get_eventName() == j) {
event[i].setNullEvents();
}
else {
cout << "Event with this name not found!" << endl;
}
i++;
} while (i < event_count);
i = 0;
}
else if (x == 3) {
cout << "Events are:\n" << endl;
do {
do{
if (event[i].get_eventName() == k) {
cout << "Enter what you want to edit about the event: " << endl;
cout << "\n1: Event Name \n2: Event Date" << endl;
cin >> z;
if (z == 1) {
cout << "Enter new name of event" << endl;
cin >> e_name;
event[i].set_eventName(e_name);
}
else if (z == 2) {
cout << "Enter new date of event" << endl;
cin >> e_date;
event[i].set_eventDate(e_date);
}
}
else {
cout << "Event with this name not found!" << endl;
}
i++;
} while (i < event_count);
i = 0;
}
break;
default:
cout << "Wrong input entered. Try again" << endl;
}
}
return 0;
}
Output:
CONCLUSION:
The university Event management system allows the administrator to store
the detail of events and user detail the implimation of the system will reduce the
data entry course time and also provide readily calculated reports this website
provide a computerize system that will benefit the students as well as the staff of
the university it also has a facility for teacher to login and also can add and
maintain University event.