SlideShare una empresa de Scribd logo
1 de 11
PROBLEM OVERVIEW.
Summary of a problem:

ICT company has for Departments which are FINANCE , TECHNICAL
OPERATION , HUMAN RESOURCE AND MARKETING and It has total of 500
employees.

It has two type of employees who are TEMPORARY and PERMANENT , it take at
most 100 temporary employee and at most 400 permanent employee.

For TEMPORARY STAFF each department is paid an hourly rate salary of $5 for
working 8 hours/day, 24 days in a month. Annual increment of $0.5/hour is offered to
each temporary staff.
                       $ 5 per hour for 8 hours/day in 24 days of a month.

                         Monthly income without annual increment is given as:
                         $ 5 * 8 hours * 24 days = $ 960.

                        Monthly income with annual increment is given as:
                         ($ 5 * 8 hours * $ 0.5 * 24 days )+ $ 960 = $ 1440.

                        Annual income with annual increment is given as:
                         $ 1440 * 12 months = $4 17,280.
Therefore:
        Total monthly income of the Temporary Staff is $ 1440.
        Total Annual Income of a Temporary staff is : $ 17,280.


For PERMANENT STAFF each department is paid a monthly initial salary of $1500
with a 5% annual increment of the basic initial salary. The company has a policy of
awarding each permanent staff a yearly bonus of 10% of the annual salary.
                       Initial salary : $ 1500
                         5% annual increment (each month of all 12 month in a
                         year) =( 5/100) * $ 1500 = $ 75

                          So monthly income with annual increment is given as:
                          $ 1500 + $ 75
                          $ 1575.

                        There fore monthly income with annual increment is
                         $1575.



                                         1
 Annual salary income of monthly income without annual
                        increment is given as:
                           $ 1500 * 12 months = $ 18,000
           Annual salary income of monthly income with annual increment is
            given as:
                        $ 1575 * 12 months = $ 18,900.

                          Bonus (10% of annual salary)= (10/100) * $ 18,000.
                                                      =$ 1,800.
                          Annual income with all increment and bonus is given as:
                          TOTAL INCOME = $ 18,900 + $ 1,800.
                                           =$ 20,700.

Therefore:
      Total monthly income of a Permanent Staff is $ 1575.
      Total Annual income of the Permanent Staff is $ 20,700.


REQUIREMENT IDENTIFICATION:
System to keep Employee’s data including ID number, department name and number
of years a staff has served the company to date (years of service).

Also be able to display ID number, department name, years of service, the current
monthly salary and the annual income of the current year (including bonuses) for each
staff.


                 Summary structure of ICT Company.




KEY:


                                         2
HR = HUMAN RESOURCE.

    TECHN.OP = TECHNICAL OPERATION.


                          DESIGNING.
In the Designing , we will consider three Classes which will be DEPARTMENT ,
TEMPORARY STAFF AND PERMANENT STAFF. This because in each
department name we will find temporary and permanent employees.

Since within Department we will find both temporary and permanent staff then
DEPARTMENT class will be Super Class and TEMPORARY STAFF,PERMANENT
STAFF will be Sub classes that will inherit from DEPARTMENT class.

                       Logical Design of Classes.




IDENTIFYING OBJECTS , ATTRIBUTES AND METHODS USED IN CLASS
DECLARATION.

Object name: Department

Atributes:

string department_name;

string employ_type;

string employ_id;

int year;

Method:

void set_data (string e_type,string e_id,string dname,int yr){

                 department_name=dname;

                 employ_id=e_id;

                                           3
employ_type=e_type;

                  year=yr;

                  }

                  string get_department_name(){

                       return department_name;

                       }

                  int get_year(){

                       return year;

                       }

                       string get_employ_type(){

                       return employ_type;

                       }

                       string get_employ_id (){

                           return employ_id;

                           }



Object name: Temporary_staff:public Department

Methods:

float get_monthly () {

return (1440);

}

float get_annual (){

return (17280);

}



Object name: Permanent_staff:public Department

                                               4
Methods:

float get_monthly (){

return (1575);

}

    float get_annual (){

    return (20700);

}



                           Algorithm used to design a system.

1.Option:1- to Add new employee, 2- to view saved employee, 0-To exit.

2.receive option, if option is 1 go step 3,Else if 2 go step 23,else if 0 go step 27,else
display Error!enter correct choice; go step 1

3.Please enter current year:

4.receive and save current year.

5.please provide number of employee to be added:

6.receive number_to_add,

7.if number > 500 go next else go step 9 ;

8.number=0; display error! Employee must be less than 501;go step 5

9.Display Menu for further option :

                      : T- for Temporary employee type, P-for permanent employee.

                      :1-for Finance department, 2- for Marketing department

                      :3-for Human resource, 4- for technical operation

10.open loop for i<=number_to_add ; i++ {

11.Enter employee type:

12.receive type

13.Enter employee id

                                             5
14.receive employee id

15.Enter year employee admitted/employed to a company;

16.receive year , if year<=current year go step 18 else go next

17.year=0,display Error!it is out of current year ; go step 15

18.Enter Department number as menu above shown;

19.receive department number, if department number is not equivalent to 1 to 4 go
next, else go step 21

20.display Error!No that department in ICT; go step 18

21.Saving data supplied

22.end loop

23.for(j=0; j<=number;j++){

24.receiving saved data

25.displaying saved data

26.}end loop

27.exit



      Codes used to desing phase that interact with the user as Algorithm stated

int main (){               //instace declaration of declared classes;

Temporary_staff temp[100];

 Permanent_staff perm[400];

string e_type ,e_id , dname,type,table_title[5];

int yr,choice,number=0,new_number=0,i,v,b,named,current_year=2011;               //i,v,b
used by for //loops and choice used by while and other as a variable

choice=1;                                 //variable new_number temporary store
history of added staff number

while(choice!=0){                              //when user chose to add again new staff,it
used to display                         //all histry from the loop


                                             6
cout<<"1- TO ADD NEW EMPLOYEE(S):"<<endl;                           //creating menu for
user interaction;

cout<<"2- TO VIEW AVAILABLE EMPLOYEE(S):"<<endl;

cout<<"0- TO EXIT:"<<endl;

 cin>>choice;

if (choice==1){

cout<<"PLEASE ENTER CURRENT YEAR:";

cin>>current_year;cout<<endl;

cout<<"PLEASE PROVIDE NUMBER OF EMPLOYEE YOU WANT TO ADD:";

cin>>number;

 if (number>500 || number ==0){         //CHECK USER INPUTS IF WANT TO ADD
1<=STAFF<=500;

cout<<"ERROR! MAXIMUM 500 STAFFS OR MINIMUM 1
STAFF:"<<"REPEATE AGAIN:";

cin>>choice;cout<<endl;}

cout<<"--------------------------HEAD-----------------------------.n";

cout<<"P- FOR PERMANENT STAFF , T- FOR TEMPORARY STAFF:"<<endl;

cout<<"1- FOR FINANCE DEPARTMENT: , 2- FOR MARKETING
DEPARTMENT:"<<endl;

cout<<"3- FOR TECHNICAL OPERATION DEPARTMENT , 4- FOR HR
DEPARTMENT:"<<endl;

cout<<"n";

new_number=new_number+number;

for (i=1;i<=number;i++){

cout<<"*********************"<<endl;

cout<<"     EMPLOYEE:"<<" "<<i<<endl;

cout<<"*********************"<<endl;


                                              7
cout<<"ENTER EMPLOYEE TYPE (eg:T for temporary):"<<" ";

cin>>type;cout<<endl;

cout<<"EMPLOYEE ID (eg:bcs/10/51752):"<<" ";

cin>>e_id;cout<<endl;

cout<<"YEAR EMPLOYED:"<<" ";

cin>>yr;cout<<endl;

cout<<"DEPARTMENT NUMBER:"<<" ";

cin>>named;cout<<endl;

switch (named){

case 1:

dname="FINANCE.";

if (type=="T" || type=="t"){               //asigning Department names according

    e_type="TEMPORARY:";             //to their number inputed by user with type of

temp[i].set_data(e_type,e_id,dname,yr);      //inputed employee

}

    if (type=="P" || type=="p"){

e_type="PERMANENT:";

perm[i].set_data (e_type,e_id,dname,yr);

break;

}

case 2:

dname="MARKETING.";

if (type=="T" || type=="t"){

e_type="TEMPORARY:";

temp[i].set_data(e_type,e_id,dname,yr);

    }

                                            8
if (type=="P" || type=="p"){

e_type="PERMANENT:";

perm[i].set_data (e_type,e_id,dname,yr);

break;

}

case 3:

dname="TECHNICAL OPERATION.";

if (type=="T" || type=="t"){

e_type="TEMPORARY:";

temp[i].set_data(e_type,e_id,dname,yr);

    }

if (type=="P" || type=="p"){

e_type="PERMANENT:";

perm[i].set_data (e_type,e_id,dname,yr);

break;

}

case 4:

dname="HUMAN RESOURCE.";

if (type=="T" || type=="t"){

e_type="TEMPORARY:";

temp[i].set_data(e_type,e_id,dname,yr);

}

if (type=="P" || type=="p"){

e_type="PERMANENT:";

perm[i].set_data (e_type,e_id,dname,yr);

break;

                                           9
}}}}

//TO DISPLAY SAVED RECORDS OF BOTH PERMANENT AND TEMPORARY
STAFF;

 if (choice==2){


cout<<"______________________________________________________________
n";

                                    cout<<"TEMPORARY STAFF RECORDS:n";

cout<<"______________________________________________________________
n";

for(v=1;v<=new_number;v++){

cout<<" "<<"RECORD NUMBER:"<<v<<endl<<endl;

cout<<":EMPLOYEE ID:"<<temp[v].get_employ_id()<<endl;

cout<<":DEPARTMENT NAME:"<<temp[v].get_department_name()<<endl;

cout<<":MONTHLY SALARY($):"<<temp[v].get_monthly()<<endl;

cout<<":ANUAL SALARY($):"<<temp[v].get_annual()<<endl;

cout<<":YEARS OF SERVICE:"<<current_year-temp[v].get_year()<<endl;

cout<<":EMPLOYEE TYPE:"<<temp[v].get_employ_type()<<endl;

cout<<"--------------------------------------------------------------n";

}cout<<endl;


cout<<"______________________________________________________________
n";

                                    cout<<"PERMANENT STAFF RECORDS:n";

cout<<"______________________________________________________________
n";

for (b=1;b<=new_number;b++){

cout<<" "<<"RECORD NUMBER:"<<v<<endl<<endl;


                                                10
cout<<":EMPLOYEE ID:"<<perm[b].get_employ_id()<<endl;

cout<<":DEPARTMENT NAME:"<<perm[b].get_department_name()<<endl;

cout<<":MONTHLY SALARY($):"<<perm[b].get_monthly()<<endl;

cout<<":ANUAL SALARY($):"<<perm[b].get_annual()<<endl;

cout<<":YEARS OF SERVICE:"<<current_year-perm[b].get_year()<<endl;

cout<<":EMPLOYEE TYPE:"<<perm[v].get_employ_type()<<endl;

cout<<"--------------------------------------------------------------n";

 }}}

system ("pause");

return 0;}



                                Concepts used to write a program.

   1) Inheritance, for example temporary stuff

   2) Arrays , for example to save data entered array used

   3) Conditional statements such as If statements and switch statements

   4) Loops , for example of loop used are for loops and while loop




                                                11

Más contenido relacionado

Similar a Oop project report using c++

What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it Time Doctor
 
Buckley hr metrics 2011_dec_12
Buckley hr metrics 2011_dec_12Buckley hr metrics 2011_dec_12
Buckley hr metrics 2011_dec_12Omar Khan
 
HR Cost Benefit Analysis
HR Cost Benefit AnalysisHR Cost Benefit Analysis
HR Cost Benefit AnalysisMsChevalier
 
THE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docx
THE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docxTHE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docx
THE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docxTalentPro India HR Pvt Ltd
 
ASCII - Anaheim, CA - Mar. 2016
ASCII - Anaheim, CA - Mar. 2016ASCII - Anaheim, CA - Mar. 2016
ASCII - Anaheim, CA - Mar. 2016IT Glue
 
Sid tpcso crowed
Sid tpcso crowedSid tpcso crowed
Sid tpcso crowedBam Lacida
 
Virtual office manager
Virtual office managerVirtual office manager
Virtual office managerKetki Dandekar
 
Anvica Payroll Management
Anvica Payroll ManagementAnvica Payroll Management
Anvica Payroll ManagementVijay Nilevar
 
Simplified payroll in myob
Simplified payroll in myobSimplified payroll in myob
Simplified payroll in myobCapgemini
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole CollegeDivyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole Collegedezyneecole
 
incentives and performance based pay
incentives and performance based payincentives and performance based pay
incentives and performance based payravneetubs
 
Robin Robins Producers Club, Feb. 2016
Robin Robins Producers Club, Feb. 2016Robin Robins Producers Club, Feb. 2016
Robin Robins Producers Club, Feb. 2016Chris Day
 
Robin Robins Producers Club - Feb 2016
Robin Robins Producers Club - Feb 2016Robin Robins Producers Club - Feb 2016
Robin Robins Producers Club - Feb 2016IT Glue
 

Similar a Oop project report using c++ (20)

What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it
 
Buckley hr metrics 2011_dec_12
Buckley hr metrics 2011_dec_12Buckley hr metrics 2011_dec_12
Buckley hr metrics 2011_dec_12
 
Bud Geting
Bud GetingBud Geting
Bud Geting
 
Bud Geting
Bud GetingBud Geting
Bud Geting
 
30% Profit
30% Profit30% Profit
30% Profit
 
HR Cost Benefit Analysis
HR Cost Benefit AnalysisHR Cost Benefit Analysis
HR Cost Benefit Analysis
 
THE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docx
THE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docxTHE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docx
THE ESSENTIAL GUIDE TO PAYROLL SERVICE IN BANGALORE.docx
 
Compensation benifits.pdf
Compensation benifits.pdfCompensation benifits.pdf
Compensation benifits.pdf
 
COMPENSATION .pdf
COMPENSATION .pdfCOMPENSATION .pdf
COMPENSATION .pdf
 
ASCII - Anaheim, CA - Mar. 2016
ASCII - Anaheim, CA - Mar. 2016ASCII - Anaheim, CA - Mar. 2016
ASCII - Anaheim, CA - Mar. 2016
 
Sid tpcso crowed
Sid tpcso crowedSid tpcso crowed
Sid tpcso crowed
 
Virtual office manager
Virtual office managerVirtual office manager
Virtual office manager
 
Anvica Payroll Management
Anvica Payroll ManagementAnvica Payroll Management
Anvica Payroll Management
 
Simplified payroll in myob
Simplified payroll in myobSimplified payroll in myob
Simplified payroll in myob
 
Salaries and Wages
Salaries and WagesSalaries and Wages
Salaries and Wages
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole CollegeDivyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
 
incentives and performance based pay
incentives and performance based payincentives and performance based pay
incentives and performance based pay
 
Robin Robins Producers Club, Feb. 2016
Robin Robins Producers Club, Feb. 2016Robin Robins Producers Club, Feb. 2016
Robin Robins Producers Club, Feb. 2016
 
Robin Robins Producers Club - Feb 2016
Robin Robins Producers Club - Feb 2016Robin Robins Producers Club - Feb 2016
Robin Robins Producers Club - Feb 2016
 
amway business
amway businessamway business
amway business
 

Último

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 

Último (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 

Oop project report using c++

  • 1. PROBLEM OVERVIEW. Summary of a problem: ICT company has for Departments which are FINANCE , TECHNICAL OPERATION , HUMAN RESOURCE AND MARKETING and It has total of 500 employees. It has two type of employees who are TEMPORARY and PERMANENT , it take at most 100 temporary employee and at most 400 permanent employee. For TEMPORARY STAFF each department is paid an hourly rate salary of $5 for working 8 hours/day, 24 days in a month. Annual increment of $0.5/hour is offered to each temporary staff.  $ 5 per hour for 8 hours/day in 24 days of a month. Monthly income without annual increment is given as: $ 5 * 8 hours * 24 days = $ 960.  Monthly income with annual increment is given as: ($ 5 * 8 hours * $ 0.5 * 24 days )+ $ 960 = $ 1440.  Annual income with annual increment is given as: $ 1440 * 12 months = $4 17,280. Therefore: Total monthly income of the Temporary Staff is $ 1440. Total Annual Income of a Temporary staff is : $ 17,280. For PERMANENT STAFF each department is paid a monthly initial salary of $1500 with a 5% annual increment of the basic initial salary. The company has a policy of awarding each permanent staff a yearly bonus of 10% of the annual salary.  Initial salary : $ 1500 5% annual increment (each month of all 12 month in a year) =( 5/100) * $ 1500 = $ 75 So monthly income with annual increment is given as: $ 1500 + $ 75 $ 1575.  There fore monthly income with annual increment is $1575. 1
  • 2.  Annual salary income of monthly income without annual increment is given as: $ 1500 * 12 months = $ 18,000  Annual salary income of monthly income with annual increment is given as: $ 1575 * 12 months = $ 18,900. Bonus (10% of annual salary)= (10/100) * $ 18,000. =$ 1,800. Annual income with all increment and bonus is given as: TOTAL INCOME = $ 18,900 + $ 1,800. =$ 20,700. Therefore: Total monthly income of a Permanent Staff is $ 1575. Total Annual income of the Permanent Staff is $ 20,700. REQUIREMENT IDENTIFICATION: System to keep Employee’s data including ID number, department name and number of years a staff has served the company to date (years of service). Also be able to display ID number, department name, years of service, the current monthly salary and the annual income of the current year (including bonuses) for each staff. Summary structure of ICT Company. KEY: 2
  • 3. HR = HUMAN RESOURCE. TECHN.OP = TECHNICAL OPERATION. DESIGNING. In the Designing , we will consider three Classes which will be DEPARTMENT , TEMPORARY STAFF AND PERMANENT STAFF. This because in each department name we will find temporary and permanent employees. Since within Department we will find both temporary and permanent staff then DEPARTMENT class will be Super Class and TEMPORARY STAFF,PERMANENT STAFF will be Sub classes that will inherit from DEPARTMENT class. Logical Design of Classes. IDENTIFYING OBJECTS , ATTRIBUTES AND METHODS USED IN CLASS DECLARATION. Object name: Department Atributes: string department_name; string employ_type; string employ_id; int year; Method: void set_data (string e_type,string e_id,string dname,int yr){ department_name=dname; employ_id=e_id; 3
  • 4. employ_type=e_type; year=yr; } string get_department_name(){ return department_name; } int get_year(){ return year; } string get_employ_type(){ return employ_type; } string get_employ_id (){ return employ_id; } Object name: Temporary_staff:public Department Methods: float get_monthly () { return (1440); } float get_annual (){ return (17280); } Object name: Permanent_staff:public Department 4
  • 5. Methods: float get_monthly (){ return (1575); } float get_annual (){ return (20700); } Algorithm used to design a system. 1.Option:1- to Add new employee, 2- to view saved employee, 0-To exit. 2.receive option, if option is 1 go step 3,Else if 2 go step 23,else if 0 go step 27,else display Error!enter correct choice; go step 1 3.Please enter current year: 4.receive and save current year. 5.please provide number of employee to be added: 6.receive number_to_add, 7.if number > 500 go next else go step 9 ; 8.number=0; display error! Employee must be less than 501;go step 5 9.Display Menu for further option : : T- for Temporary employee type, P-for permanent employee. :1-for Finance department, 2- for Marketing department :3-for Human resource, 4- for technical operation 10.open loop for i<=number_to_add ; i++ { 11.Enter employee type: 12.receive type 13.Enter employee id 5
  • 6. 14.receive employee id 15.Enter year employee admitted/employed to a company; 16.receive year , if year<=current year go step 18 else go next 17.year=0,display Error!it is out of current year ; go step 15 18.Enter Department number as menu above shown; 19.receive department number, if department number is not equivalent to 1 to 4 go next, else go step 21 20.display Error!No that department in ICT; go step 18 21.Saving data supplied 22.end loop 23.for(j=0; j<=number;j++){ 24.receiving saved data 25.displaying saved data 26.}end loop 27.exit Codes used to desing phase that interact with the user as Algorithm stated int main (){ //instace declaration of declared classes; Temporary_staff temp[100]; Permanent_staff perm[400]; string e_type ,e_id , dname,type,table_title[5]; int yr,choice,number=0,new_number=0,i,v,b,named,current_year=2011; //i,v,b used by for //loops and choice used by while and other as a variable choice=1; //variable new_number temporary store history of added staff number while(choice!=0){ //when user chose to add again new staff,it used to display //all histry from the loop 6
  • 7. cout<<"1- TO ADD NEW EMPLOYEE(S):"<<endl; //creating menu for user interaction; cout<<"2- TO VIEW AVAILABLE EMPLOYEE(S):"<<endl; cout<<"0- TO EXIT:"<<endl; cin>>choice; if (choice==1){ cout<<"PLEASE ENTER CURRENT YEAR:"; cin>>current_year;cout<<endl; cout<<"PLEASE PROVIDE NUMBER OF EMPLOYEE YOU WANT TO ADD:"; cin>>number; if (number>500 || number ==0){ //CHECK USER INPUTS IF WANT TO ADD 1<=STAFF<=500; cout<<"ERROR! MAXIMUM 500 STAFFS OR MINIMUM 1 STAFF:"<<"REPEATE AGAIN:"; cin>>choice;cout<<endl;} cout<<"--------------------------HEAD-----------------------------.n"; cout<<"P- FOR PERMANENT STAFF , T- FOR TEMPORARY STAFF:"<<endl; cout<<"1- FOR FINANCE DEPARTMENT: , 2- FOR MARKETING DEPARTMENT:"<<endl; cout<<"3- FOR TECHNICAL OPERATION DEPARTMENT , 4- FOR HR DEPARTMENT:"<<endl; cout<<"n"; new_number=new_number+number; for (i=1;i<=number;i++){ cout<<"*********************"<<endl; cout<<" EMPLOYEE:"<<" "<<i<<endl; cout<<"*********************"<<endl; 7
  • 8. cout<<"ENTER EMPLOYEE TYPE (eg:T for temporary):"<<" "; cin>>type;cout<<endl; cout<<"EMPLOYEE ID (eg:bcs/10/51752):"<<" "; cin>>e_id;cout<<endl; cout<<"YEAR EMPLOYED:"<<" "; cin>>yr;cout<<endl; cout<<"DEPARTMENT NUMBER:"<<" "; cin>>named;cout<<endl; switch (named){ case 1: dname="FINANCE."; if (type=="T" || type=="t"){ //asigning Department names according e_type="TEMPORARY:"; //to their number inputed by user with type of temp[i].set_data(e_type,e_id,dname,yr); //inputed employee } if (type=="P" || type=="p"){ e_type="PERMANENT:"; perm[i].set_data (e_type,e_id,dname,yr); break; } case 2: dname="MARKETING."; if (type=="T" || type=="t"){ e_type="TEMPORARY:"; temp[i].set_data(e_type,e_id,dname,yr); } 8
  • 9. if (type=="P" || type=="p"){ e_type="PERMANENT:"; perm[i].set_data (e_type,e_id,dname,yr); break; } case 3: dname="TECHNICAL OPERATION."; if (type=="T" || type=="t"){ e_type="TEMPORARY:"; temp[i].set_data(e_type,e_id,dname,yr); } if (type=="P" || type=="p"){ e_type="PERMANENT:"; perm[i].set_data (e_type,e_id,dname,yr); break; } case 4: dname="HUMAN RESOURCE."; if (type=="T" || type=="t"){ e_type="TEMPORARY:"; temp[i].set_data(e_type,e_id,dname,yr); } if (type=="P" || type=="p"){ e_type="PERMANENT:"; perm[i].set_data (e_type,e_id,dname,yr); break; 9
  • 10. }}}} //TO DISPLAY SAVED RECORDS OF BOTH PERMANENT AND TEMPORARY STAFF; if (choice==2){ cout<<"______________________________________________________________ n"; cout<<"TEMPORARY STAFF RECORDS:n"; cout<<"______________________________________________________________ n"; for(v=1;v<=new_number;v++){ cout<<" "<<"RECORD NUMBER:"<<v<<endl<<endl; cout<<":EMPLOYEE ID:"<<temp[v].get_employ_id()<<endl; cout<<":DEPARTMENT NAME:"<<temp[v].get_department_name()<<endl; cout<<":MONTHLY SALARY($):"<<temp[v].get_monthly()<<endl; cout<<":ANUAL SALARY($):"<<temp[v].get_annual()<<endl; cout<<":YEARS OF SERVICE:"<<current_year-temp[v].get_year()<<endl; cout<<":EMPLOYEE TYPE:"<<temp[v].get_employ_type()<<endl; cout<<"--------------------------------------------------------------n"; }cout<<endl; cout<<"______________________________________________________________ n"; cout<<"PERMANENT STAFF RECORDS:n"; cout<<"______________________________________________________________ n"; for (b=1;b<=new_number;b++){ cout<<" "<<"RECORD NUMBER:"<<v<<endl<<endl; 10
  • 11. cout<<":EMPLOYEE ID:"<<perm[b].get_employ_id()<<endl; cout<<":DEPARTMENT NAME:"<<perm[b].get_department_name()<<endl; cout<<":MONTHLY SALARY($):"<<perm[b].get_monthly()<<endl; cout<<":ANUAL SALARY($):"<<perm[b].get_annual()<<endl; cout<<":YEARS OF SERVICE:"<<current_year-perm[b].get_year()<<endl; cout<<":EMPLOYEE TYPE:"<<perm[v].get_employ_type()<<endl; cout<<"--------------------------------------------------------------n"; }}} system ("pause"); return 0;} Concepts used to write a program. 1) Inheritance, for example temporary stuff 2) Arrays , for example to save data entered array used 3) Conditional statements such as If statements and switch statements 4) Loops , for example of loop used are for loops and while loop 11