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

Function main

Lab_12/main.cpp:104–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104int main()
105{
106 int choice;
107 while (1)
108 {
109
110 string firstName, middleName, lastName;
111 FullName fullName1;
112 // 2
113 string Id;
114 int goals, matches;
115 Player player1;
116 cout << "Add: First Name, Middle Name, Last Name: \n\n";
117 cout << "First Name: \n";
118 cin >> firstName;
119 cout << "Middle Name: \n";
120 cin >> middleName;
121 cout << "Last Name:\n ";
122 cin >> lastName;
123
124 FullName fullName(firstName, middleName, lastName);
125 fullName.setFirstName(firstName);
126 fullName.setMiddleName(middleName);
127 fullName.setLastName(lastName);
128
129 cout << "Main menu: \n";
130 cout << "[1] Add details\n";
131 cout << "[2] Display details\n";
132 cout << "[3] No. of goals\n";
133 cout << "[4] Delete details\n";
134 cout << "[0] Exit\n";
135 cout << "Your Choice: ";
136
137 cin >> choice;
138 switch (choice)
139 {
140 case 1:
141 system("cls");
142 cout << "We have entered in the beginning!" << endl;
143 // fullName.setFirstName(firstName);
144 // fullName.setMiddleName(middleName);
145 // fullName.setLastName(lastName);
146 /* FullName fullName(firstName, middleName, lastName);
147 fullName.setFirstName(firstName);
148 fullName.setMiddleName(middleName);
149 fullName.setLastName(lastName);*/
150
151 break;
152 case 2:
153 system("cls");
154 cout << "Details of the Player: \n";
155 cout << "Id: ";
156 cin >> Id;
157 cout << "Matches_Played: ";
158 cin >> matches;
159 player1.setPlayer_ID(Id);
160 player1.setMatches_Played(matches);
161 cout << endl;

Callers

nothing calls this directly

Calls 11

Increse_GoalScoredFunction · 0.85
setFirstNameMethod · 0.80
setMiddleNameMethod · 0.80
setLastNameMethod · 0.80
setPlayer_IDMethod · 0.80
setMatches_PlayedMethod · 0.80
getPlayer_IDMethod · 0.80
getFirstNameMethod · 0.80
getLastNameMethod · 0.80
getMiddleNameMethod · 0.80
getMatches_PlayedMethod · 0.80

Tested by

no test coverage detected