Total members 9946 | Gratitudes |It is currently Thu Feb 09, 2012 2:47 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 4 posts ] 
Author Question
 Question subject: urgent help from any one exp in c++ i need codes
PostPosted: Fri Jun 12, 2009 10:19 am 
Offline
Newbie
User avatar

Joined: Fri Jun 12, 2009 9:23 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time

i have assigment in c++ it difficult for me to resolve
a software company owner want to build a system to schedule employee by cheching 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


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: urgent help from any one exp in c++ i need codes
PostPosted: Sun Jun 14, 2009 2:21 am 
Offline
Newbie
User avatar

Joined: Wed Apr 18, 2007 7:26 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
which part exactly that you can't do ?


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: urgent help from any one exp in c++ i need codes
PostPosted: Mon Jun 15, 2009 7:08 pm 
Offline
Newbie
User avatar

Joined: Fri Jun 12, 2009 9:23 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
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.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: urgent help from any one exp in c++ i need codes
PostPosted: Wed Jul 22, 2009 5:23 pm 
Offline
Moderator
User avatar

Joined: Fri Nov 21, 2008 6:18 pm
Posts: 51
Location: thessaloniki
Has thanked: 0 time
Have thanks: 2 time
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..

_________________
if you want make an effort yourself no one will make it for you...
best regards


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 4 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 i am using NetBeans 7.0, HELP NEEDED - URGENT  General Discussion  Anonymous  0
 freelance programmer NEEDED,URGENT  Job Opportunities  tmdiane  2
 html codes  Java  Anonymous  2
 images,videos and signatures displaying as codes  PHP  finsnfish  3
 PHP forum- images displaying as codes  PHP  finsnfish  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team