MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / main

Function main

Lab_10/studentCourseEvaluation.cpp:99–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97};
98
99int main()
100{
101 int choice;
102 cout << "1. Student" << endl;
103 cout << "2. Employee" << endl;
104 cout << "Your choice: ";
105 cin >> choice;
106 cout << endl;
107
108 Student student; // creating an object of a class "Student"
109 Employee employee; // creating an object of a class "Employee"
110 switch (choice)
111 {
112 case 1:
113 {
114 student.TakeData();
115 cout << endl;
116 student.showData();
117 }
118 break;
119 case 2:
120 {
121 while (true)
122 {
123 system("cls");
124 int choice_employee;
125
126 cout << "1. Input Employee Details\n";
127 cout << "2. Display Employee Details\n";
128 cout << "3. Display Salary\n";
129 cin >> choice_employee;
130 switch (choice_employee)
131 {
132 case 1:
133 {
134 string x, y;
135 int z, i;
136 system("cls");
137 cout << "\t\t\tEmployee information\n";
138 cout << "Employee_ID: ";
139 cin >> x;
140 cout << "Employee_Name: ";
141 cin >> y;
142 cout << "Number of worked Hours: ";
143 cin >> z;
144 cout << "Rate per Hour: ";
145 cin >> i;
146 cout << endl;
147 employee.setEmployee_ID(x);
148 employee.setEmployee_Name(y);
149 employee.setHours(z);
150 employee.setRate(i);
151 system("pause");
152 }
153 break;
154 case 2:
155 {
156 system("cls");

Callers

nothing calls this directly

Calls 11

TakeDataMethod · 0.80
showDataMethod · 0.80
setEmployee_IDMethod · 0.80
setEmployee_NameMethod · 0.80
setHoursMethod · 0.80
setRateMethod · 0.80
getEmployee_IDMethod · 0.80
getEmployee_NameMethod · 0.80
getHoursMethod · 0.80
getRateMethod · 0.80
total_salaryMethod · 0.80

Tested by

no test coverage detected