Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void dataEntryMess();
- void messLine();
- /*
- defines:
- can be but doesn't necessary
- need to be used.
- it's code it can be changed to
- suit yours and the programs needs
- */
- #define SALES_WORKER 500
- #define GROSS_SALES 6.5
- enum class paycode
- { TEAM=1, SALES=2, PEICE=3, HOURLY=4, QUIT=-1};
- int main(){
- char run='y';
- int c=0;
- do
- {
- dataEntryMess();
- cin>>c;
- /*
- within each case starts your real work
- of data gathering and processing
- */
- switch(static_cast<paycode>(c)){
- case paycode::TEAM:
- cout<<"enter data collection \n"
- <<"for Team Leaders\n";
- break;
- case paycode::SALES:
- cout<<"Enter data collection \n"
- <<"for Sales worker\n";
- break;
- case paycode::PEICE:
- cout<<"Enter data collection \n"
- <<"for Peiceworkers\n";
- break;
- case paycode::HOURLY:
- cout<<"Enter data collection \n"
- <<"for Hourly workers\n";
- break;
- case paycode::QUIT:
- run='n';
- break;
- default:
- break;
- }// end switch
- }while(run == 'y');
- return 0;
- }
- void dataEntryMess(){
- messLine();
- cout<<"Enter code for employee type\n"
- <<"1. Team Leader\n"
- <<"2. Sales worker\n"
- <<"3. Peiceworker\n"
- <<"4. Hourly worker\n";
- messLine();
- //<<"******************************\n"
- cout<<"* Enter (negative one) -1 to quit *\n";
- messLine();
- //<<"* *\n"
- //<<"******************************\n";
- }
- void messLine(){
- for(int i=0;i<30;i++)
- cout<<"*";
- cout<<"\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement