Switch to full style
For C/C++ coders discussions and solutions
Post a reply

build a system to schedule employee by checking availability

Fri Jun 12, 2009 10:19 am

i have assigment in c++ it difficult for me to resolve
a software company owner want to build a system to schedule employee by checking their availability; the time that they come and the time that they leave then compute working hours. also he wants to be able to add new employee or remove another from existing list of employees.

function required
1- class employee
data member should chosen by student himself like name ,id job or any other information

declare more than one object inside main program for each class type


2-class 2: define a class call admin inherited from Employee class

data member should chosen by student himself (take into your consideration the constructor and deconstructor function)

define a member function called ADD to insert new admin information
define a member function called REMOVE to delete special admin

compute Programmers working hours

declare objects from class type (you should declare more object).



class 3: define a class call Programmer inherited from Employee class

data member should chosen by student himself (take into your consideration the constructor and deconstructor function)

define a member function called ADD to insert new programmer information
define a member function called REMOVE to delete special programmer



declare objects from class type (you should declare more object).


remark

all informatin save in array after close program it will be lost not in file.

when user use program there are 3 chioce will show

1-admin

if choose admin will show some option
-insert new admin
-remove admin
-insert employee
-delete employee
-caculate working hours of employee
-return main menu

2- if choose programmer will show some option
-add new programmer
-remove programmer
-check in (time that they come)
-check out(time that they leave

return main menu


3-exit
_____________________________
*all informatiom enter by user.
*program include switch statement to move between option.
*all class declaration put in header file.

i need code before end of 20/6/2009
sorry for disturb
with thanks



Re: urgent help from any one exp in c++ i need codes

Sun Jun 14, 2009 2:21 am

which part exactly that you can't do ?

Re: urgent help from any one exp in c++ i need codes

Mon Jun 15, 2009 7:08 pm

Code:
class employee
{
      private:
       struct EmployeeRecord
       {
         string EmpName;
         string EmpDOB;
         string EmpJob;
         int    EmpID;
         double EmpSalary;

       };
      
        EmployeeRecord Emp[100];
      
      public:
                 employee(void);
         void addEmployee(int EmpCounter);
         void deletEmployee(int EmpCounter);
           void showEmployeeRecords(int EmpCounter);    
         

};


employee::employee(void)
   {   }


void employee::addEmployee(int EmpCounter)
{

         cout<<"Enter Employee ID Number:"<<endl;
         cin>>Emp[EmpCounter].EmpID;

         cout<<"Enter Employee Name:"<<endl;
         cin>>Emp[EmpCounter].EmpName;

         cout<<"Enter Employee Birth Day:"<<endl;
         cin>>Emp[EmpCounter].EmpDOB;

         cout<<"Enter Employee job:"<<endl;
         cin>>Emp[EmpCounter].EmpJob;

         cout<<"Enter Employee Salary:"<<endl;
         cin>>Emp[EmpCounter].EmpSalary;
}


void employee::deletEmployee(int EmpCounter)
{
         int RecordNo;
         int DeletedEmpID;
           
         RecordNo=0;
         cout<<"Enter Staff Number:"<<endl;
         cin>>DeletedEmpID;
         for(int i=1;i<=EmpCounter;i++)
            {
               if(Emp[i].EmpID==DeletedEmpID)
               {
                  RecordNo=i;
                  break;
                }
            }
        if (RecordNo==0)
      {
         cout<<"Employee ID is Not Correct!!"<<endl;
      }
      else
      {
         for (int j=DeletedEmpID;j<=EmpCounter;j++)
         {
           Emp[j].EmpID     = Emp[j+1].EmpID;
           Emp[j].EmpName   = Emp[j+1].EmpName;
           Emp[j].EmpJob    = Emp[j+1].EmpJob;
           Emp[j].EmpDOB    = Emp[j+1].EmpDOB;
           Emp[j].EmpSalary = Emp[j+1].EmpSalary;
         }

      }               
}

void employee::showEmployeeRecords(int EmpCounter)
{
  cout <<"Employee Recordes"<<endl;
  cout <<"================================"<<endl;
  for (int j=1;j<=EmpCounter;j++)
  {
    cout <<"Employee ID: "<<Emp[j].EmpID<<endl;
    cout <<"Employee Name: "<<Emp[j].EmpName<<endl;
   cout <<"Employee Job: "<<Emp[j].EmpJob<<endl;
   cout <<"Employee Date of Birth: "<<Emp[j].EmpDOB<<endl;
   cout <<"Employee Salary: "<<Emp[j].EmpSalary<<endl;
    cout <<"================================"<<endl;
  }

}




this is empoyee class but i do not if is correct or not
but how i can do inheritence from it as i explain last time for admin and for programmer, admin make -insert new admin
-remove admin
-insert employee
-delete employee
-caculate working hours of employee
  and programmer
make
add new programmer
-remove programmer
-check in (time that they come employee)
-check out(time that they leave employee)

and how create object in main program

thanks so much for reply
i have just approximetly 12 days to submit project to teacher and i study parttime and i study basic things only
thanks again.


Re: urgent help from any one exp in c++ i need codes

Wed Jul 22, 2009 5:23 pm

did he told you to do this in c++? or you can use any kind of language..??

i would suggest you another way of doing this project create a menu with the things you need
to put such as delete employer etc cause to create buttons is not an easy thing.. after it make 2 tables one for employes and another for the programmer ..and go it separate ways in the end combine the 2 parts to work properly ..) it s an easy way ...always first make an analisys before you start to write down code ..cause you might find many easy ways to do it..

Post a reply
  Related Posts  to : build a system to schedule employee by checking availability
 code for check availability     -  
 checking if a HTML element is visible or hidden under JQuery     -  
 Build Calculator in OpenGL     -  
 how to build cell phone app     -  
 Creating a Java Application Build using RAD 7     -  
 how to build a rating bar in easy and quick way in website     -  
 Build distribution applications by remoting(TCP/HTTP)     -  
 Use two dimensional array to build company sales program     -  
 Build Linear Regression in Python - Supervised Learning     -  
 a moving graph sortof widget build using Swing     -