based on this C ++ program below, do detail specific ALGORITHM (FLOW CHARTS OR PSEUDOCODES). you can devide it to each subroutine if you want
The cpp.file can download here
Downloads file:- https://gofile.io/d/xjIRdW
or you can see below the program.Just do algorithm based on this program
#include #include #include using namespace std;/o of employeeint n=0;struct Employee{ int no; int e_id; string position; float bonus; float penalty; float kwsp; float salary;};void add(Employee data[1000]){ cout"Enter Details "; cout"Number: "; data[n].no=n+1; coutendl; cout"E_ID: "; cin>>data[n].e_id; int choice; cout"Emter Position 1.Manager 2.Markeing 3.Salesman =>"; cin>>choice; if(choice==1) { data[n].position="Manager"; data[n].salary=50000; } else if(choice==2) { data[n].position="Marketing"; data[n].salary=40000; } else if(choice==3) { data[n].position="Salesman"; data[n].salary=20000; } cout"Bonus: "; cin>>data[n].bonus; cout"Penalty: "; cin>>data[n].penalty; cout"KWSP: "; cin>>data[n].kwsp; data[n].salary+=data[n].bonus-data[n].penalty+data[n].kwsp; n++;}void show( Employee data[1000] ){ cout" NUMBER,Employee ID,Position,Bonus,Penalty,KWSP Deduction,Salary "; //data printing for (int i = 0; i cout" , "" , "" , "" , " " , "" , "endl; }}void del( Employee data[1000] ){ cout"Enter Employee ID Number: "; int id; cin>>id; for(int i=0;iif(id==data[i].e_id) { cout"E_ID: "" "; cout"Position: "" "; cout"Bonus: "" "; cout"Penalty: "" "; cout"KWSP: "" "; char ch; cout" Want to delete?? (y,n) :"; cin>>ch; if(ch=='y'||ch=='Y') { for(int j=i;j-1;j++) { data[j]=data[j+1]; data[j].no-=1; } n--; cout" Deleted.. "; return; } else return; } } cout" Not Found!! ";}void modify( Employee data[1000] ){ cout"Enter Details "; cout"Employee ID Number: "; int id; cin>>id; cout"Enter Modify data: "; for(int i=0;iif(id==data[i].e_id) { cout"E_ID: "; cin>>data[i].e_id; int choice; cout"Emter Position 1.Manager 2.Markeing 3.Salesman =>"; cin>>choice; if(choice==1) { data[i].position="Manager"; data[i].salary=50000; } else if(choice==2) { data[i].position="Marketing"; data[i].salary=40000; } else if(choice==3) { data[i].position="Salesman"; data[i].salary=20000; } cout"Bonus: "; cin>>data[i].bonus; cout"Penalty: "; cin>>data[i].penalty; cout"KWSP: "; cin>>data[i].kwsp; data[i].salary+=data[i].bonus-data[i].penalty-data[i].kwsp; return; } } cout" Not Found!! ";}void ReadDB(Employee data[1000]){ ifstream myfile("DB.csv"); while(!myfile.eof()) { //fist line skip if(n==0) { string l; getline(myfile,l); cout",Salary"endl; } char coma; myfile>>data[n].no; myfile>>coma; myfile>>data[n].e_id; myfile>>coma; getline(myfile, data[n].position,','); if(data[n].position=="Manager") { data[n].salary=50000; } else if(data[n].position=="Marketing") { data[n].salary=40000; } else { data[n].salary=20000; } myfile>>data[n].bonus; myfile>>coma; myfile>>data[n].penalty; myfile>>coma; myfile>>data[n].kwsp; data[n].salary+=data[n].bonus-data[n].penalty+data[n].kwsp; //empty data exit from here if(n>0 && data[n].position=="") { break; } n++; } myfile.close();}void save(Employee data[1000]){ ofstream myfile("DBsalary.csv"); int i=0; while(i//fist line skip if(i==0) { string l="NUMBER,Employee ID,Position,Bonus,Penalty,KWSP Deduction,Salary "; myfilechar coma=','; myfile' '; i++; } myfile.close(); cout" save to DBsalary.csv";}void search( Employee data[1000] ){ cout"Enter Details "; cout"Employee ID Number: "; int id; cin>>id; for(int i=0;iif(id==data[i].e_id) { cout"No.: "" "; cout"E_ID: "" "; cout"Position: "" "; cout"Bonus: "" "; cout"Penalty: "" "; cout"KWSP: "" "; cout"Salary: "" "; return ; } } cout" Not Found!! ";}int main(){ Employee data[1000]; cout" === DATA BASE === "; ReadDB(data); //data printing for (int i = 0; i cout" , "" , "" , "" , " " , "" , "endl; } int choice; do { cout" 1. Add Employee" " 2. Edit Employee" " 3. Delete Employee" " 4. Search Employee" " 5. View Employees and Salary" " 6. Save and Exit the information" " Select Your Choice :=> "; cin>>choice; switch(choice) { case 1: add(data); break; case 2: modify(data); break; case 3: del(data); break; case 4: search( data ); break; case 5: show(data); break; case 6: save(data); break; default: cout"Enter a valid option!! "; } }while(choice!=6);return 0;}<><><><><>
LO S 0 1) d'ENG 5:22 PM 21/06/2021 15 X File Edit Selection View Go Run Terminal Help main.cpp - AAAAAAAAAAAAAAA - Visual Studio Code X EXPLORER PROBLEMS OUTPUT DEBUG CONSOLE TERMINAL Code + OPEN EDITORS O * Getting Started save to DBsalary . csV. . X C main.cpp PS C: \\Users\\lavi\\Desktop\\AAAAAAAAAAAAAAA> cd "c: \\Users\\lavi\\Desktop\\AAAAAAAAAAAAAAA\\" ; if ($?) { g++ main.cpp -o main } ; if ($?) { . \\main } DBsalary.csv === DATA BASE === DB.CSV NUMBER, Employee ID, Position, Bonus, Penalty, KWSP Deduction, Salary AAAAAAAAAAAAAAA 1 , 101 , Manager , 600 , 2 , -100 , 50498 .vscode 2 , 102 , Marketing , 0 , 6 , -100 , 39894 {} settings.json 3 , 103 , Salesman , 50 , 8 , -100 , 19942 DB copy for backup.csv 104 , Salesman , 333 , 9 , -100 , 20224 DB.CSV 105 , Salesman , 150 , 0 , -100 , 20050 DBsalary.csv 106 , Manager , 152 , 1 , -100 , 50051 main.cpp 107 , Marketing , 250 , 1 , -100 , 40149 main.exe 8 , 108 , Manager , 36 , 5 , -100 , 49931 9 , 109 , Marketing , 0 , 4 -100 , 39896 10 , 110 , Marketing , 0 -100 , 39895 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=> 1 Enter Details Number: 11 E_ID: 111 Enter Position 1.Manager 2.Markeing 3. Salesman =>2 Bonus : 100 Penalty: 2 KWSP: -100 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information > OUTLINE Ln 300, Col 32 Spaces: 4 UTF-8 CRLF C+ + Win3287LO V S 9 XI 0 1) 'ENG 5:22 PM 21/06/2021 15 XI File Edit Selection View Go Run Terminal Help main.cpp - AAAAAAAAAAAAAAA - Visual Studio Code X EXPLORER PROBLEMS OUTPUT DEBUG CONSOLE TERMINAL Code + OPEN EDITORS O * Getting Started NUMBER, Employee ID, Position, Bonus, Penalty, KWSP Deduction, Salary X & main.cpp 1 , 101 , Manager , 600 , 2 -100 , 50498 DBsalary.csv 102 , Marketing , 0 , 6 -100 , 39894 DB.CSV , 103 , Salesman , 50 , 8 , -100 , 19942 AAAAAAAAAAAAAAA , 104 , Salesman , 333 , 9 , -100 , 20224 .vscode , 105 , Salesman , 150 , 0 , -100 , 20050 {} settings.json 6 , 106 , Manager , 152 , 1 , -100 , 50051 1.jpg 7 , 107 , Marketing , 250 , 1 , -100 , 40149 DB copy for backup.csv 8 , 108 , Manager , 36 , 5 , -100 , 49931 DB.CSV 9 , 109 , Marketing , 0 , 4 -100 , 39896 DBsalary.csv 10 , 110 , Marketing , 0 , 5 -100 , 39895 main.cpp 11 , 111 , Marketing , 100 , -100 , 39998 main.exe 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=> 2 Enter Details Employee ID Number: 110 Enter Modify data: E_ID: 110 Enter Position 1.Manager 2.Markeing 3. Salesman =>1 Bonus : 200 Penalty: 2 KWSP: -100 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information > OUTLINE Select Your Choice :=> 5/ @040 Ln 300, Col 32 Spaces: 4 UTF-8 CRLF C++ Win32871. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=> 3 Enter Employee ID Number: 109 E_ID: 109 Position: Marketing Bonus: 0 Penalty: 4 KWSP: -100 want to delete?? (y,n) :y 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=> 5 NUMBER, Employee ID, Position, Bonus, Penalty, KWSP Deduction, Salary 1 , 101 , Manager , 600 , 2 , -100 , 50498 2 102 , Marketing , 0 , 6 , - -100 , 39894 103 , Salesman , 50 , 8 , -100 , 19942 104 , Salesman , 333 , 9 , -100 20224 5 105 , Salesman , 150 , 0 , -100 , 20050 6 , 106 , Manager , 152 , -100 , 50051 7 , 107 , Marketing , 250 , 1 -100 , 40149 8 , 108 , Manager , 36 , 5 , -100 , 49931 9 , 110 , Manager , 200 , -100 , 50298 10 , 111 , Marketing , 100 , 2 , -100 , 39998 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=>NUMBER, Employee ID, Position, Bonus, Penalty, KWSP Deduction, Salary 1 , 101 , Manager , 600 , 2 , -100 , 50498 2 102 , Marketing , 0 , 6 , -100 , 39894 3 103 , Salesman , 50 , 8 , -100 , 19942 4 104 , Salesman , 333 , 9 , -100 , 20224 5 , 105 , Salesman , 150 , 0 , -100 , 20050 6 106 Manager , 152 , 1 , -100 , 50051 7 , 107 , Marketing , 250 , 1 , -100 , 40149 8 , 108 , Manager , 36 , 5 , -100 , 49931 9 , 110 , Manager , 200 , 2 , -100 , 50298 10 , 111 , Marketing , 100 , 2 , -100 , 39998 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=> 4 Enter Details Employee ID Number: 105 No. : 5 E ID: 105 Position: Salesman Bonus: 150 Penalty: 0 KWSP: -100 Salary: 20050Select Your Choice :=> 5 NUMBER, Employee ID, Position, Bonus, Penalty, KWSP Deduction, Salary 1 , 101 , Manager , 600 , 2 , -100 , 50498 2 , 102 , Marketing , 0 , 6 , -100 , 39894 3 , 103 , Salesman , 50 , 8 , -100 , 19942 4 104 , Salesman , 333 , 9 , -100 , 20224 5 , 105 , Salesman , 150 , 0 , -100 , 20050 6 , 106 , Manager , 152 , 1 , -100 , 50051 7 , 107 , Marketing , 250 , 1 , -100 , 40149 8 , 108 , Manager , 36 , 5 , -100 , 49931 9 , 110 , Manager , 200 , 2 , -100 , 50298 10 , 111 , Marketing , 100 , 2 , -100 , 39998 1. Add Employee 2. Edit Employee 3. Delete Employee 4. Search Employee 5. View Employees and Salary 6. Save and Exit the information Select Your Choice :=> 6 save to DBsalary . csv PS C: \\Users\\lavi\\Desktop\\AAAAAAAAAAAAAAA>Salary management system of a company The program calculates the monthly salary of worker of a company . Minimum of 10 workers should be considered. The amount of salary should consider several factor: the position of that individual, bonus, overtime, slash or penalty Kwsp allocations and others . The program should provide the individual pay - slip if requested . Further , the salary analysis for the whole company should be made . Note : kwap is a compulsory retirement savings fund that will deduct () 100 for each employee every month manager salary for 1 month = 50 000 - marketing salary for 1 month = 40 000 > salesman salary for 1 month = 20 000 sample data for 10 Employees. (YOU CAN CHANGE THIS PATA BELOW WHAT EVER YOU WANT) NUMBER employee ID Position Bonus Over time Penalty KWSP Deduction per month C 101 Marager 600 50 - ! -100 109 Marketing O - 6 -100 156 Salesman 50 - 8 - 100 3 176 Sales man 350 70 -9 .10 4 123 Sales man 450 100 - 0 -100 VI 124 Manager 170 200 -1 -100 6 154 Marketing 800 O -1 100 7 190 Marketing 340 O -100 168 Salesman O 100 -100 113 Salesman O 50 .5 - 100 NOTE: YOU CAN USE /CHANGE THIS DATA WHATEVER UWAT NOTE : as long as the program can insert position, overtime, bonus penalty that was enough . Just simple. Start -107 - 10 Get employee Employee Details EMPLOYEE POSITION KWSP BONUS Penalty OVERTIME Total = Position Amount + Over time Bonus - Penalty -KWSP Emp Salary Store Salary Individual Pay Analysis Shp stop CamScanner