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

Function F_Second_Program

Lab_15/Source.cpp:290–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290void F_Second_Program()
291{
292 system("cls");
293
294 CURR_ACCT account1;
295 SAV_ACCT account2;
296
297 for (int i = 0; i < 1000; i++)
298 {
299 system("cls");
300 cout << "\t WELCOME TO 'AliBank' \n Chooce your account rate: \n 1. Current account\n 2. Saving account\n 0. Go back \n Your choice: ";
301 switch (_getch())
302 {
303 // current account
304 case '1':
305 system("cls");
306 account1.getdata(); // calling the function from base class
307 for (int l = 0; l < 1000; l++)
308 {
309 system("cls");
310 cout << " 1. Deposit \n 2. Display the balance \n 3. Withdraw money \n 0. Go back \n Your choice: ";
311 switch (_getch())
312 {
313 // case 1 for the first program
314 case '1':
315 system("cls");
316 account1.Deposit();
317 system("pause");
318 break;
319 // case 2 for the second program
320 case '2':
321 system("cls");
322 account1.Balance();
323 system("pause");
324 break;
325 case '3':
326 system("cls");
327 account1.Withdraw();
328 account1.Penalty();
329 system("pause");
330 break;
331 case '0':
332 l = 1000;
333 F_Second_Program();
334 break;
335 default:
336 cout << "\tYour choice is not available in Menu. \n\t Please try one more time.\n";
337 break;
338
339 } // switch
340 } // for loop
341
342 // saving account
343 case '2':
344 system("cls");
345 account2.getdata(); // calling the function from base class
346 for (int j = 0; j < 1000; j++)
347 {

Callers 1

mainFunction · 0.70

Calls 6

PenaltyMethod · 0.80
Compute_InterestMethod · 0.80
getdataMethod · 0.45
DepositMethod · 0.45
BalanceMethod · 0.45
WithdrawMethod · 0.45

Tested by

no test coverage detected