Wednesday, January 5, 2011

[discussion_vu] Fwd: "Cs201 solution by AßdUllAh TAhir " :D

/*
Name: AßdUllAh TAhir

Author: AßdUllAh TAhir
Date: 05/01/11 23:58
Description: This program is desgined with class named calsalary in which we
take input from user and calculate salary.
*/

/*
IDea solution
Please do not copy it "you will get zero marks" */

#include<iostream.h>
#include<conio.h>
#include<string.h>
using namespace std;
class CalSalary
{private:
int EID, EGrade;
string Name;
public:
CalSalary()
{EID=0;
EGrade=0;
Name='/0';}
void GetInput()
{cout<<"please enter employee name : ";
cin>>Name;
cout<<"please enter employee ID : ";
cin>>EID;
cout<<"please enter employee Grade : ";
cin>>EGrade;}

int GetID()
{return EID;}
void SetID(int ID)
{EID=ID;}
int GetGrade()
{return EGrade;}
void SetGrade(int Grade)
{EID=Grade;}
string GetName()
{return Name;}
void SetName(string N)
{Name=N;}
void Calculate(int G)
{switch(G)

{case 17:
{cout<<endl<<"The Net salary of "<<Name<<" Is Rs."<<21750<<endl;
break;}
case 18:
{cout<<endl<<"The Net salary of "<<Name<<" Is Rs."<<29000<<endl;
break;}
case 19:
{cout<<endl<<"The Net salary of "<<Name<<" Is Rs."<<36250<<endl;
break;}
default :
cout<<"Grade of Employee is incorrect"<<endl;

}
}



};
main()
{ int G=0;
CalSalary cal;
cal.GetInput();
G=cal.GetGrade();
cal.Calculate(G);
getch();
}





*~ WS ~*
*~ Devil Jin ~*
*
Bscs 4th Semester *



---------- Forwarded message ----------
From: дßđцζζдh Tдhir <bc090400509@vu.edu.pk>
Date: 2011/1/5
Subject: (VU-Study-Corner) "Cs201 solution by AßdUllAh TAhir " :D
To: VU-Study-Corner@googlegroups.com, vu-cs-experts@googlegroups.com


Kindly see the attachment :D

 
♪♫☼►☺♥♣♦♠ ~"LONg LIve PAKIStaN"~♪♫☼►☺♥♣♦♠
 
 





--
Follow these group rules if you want to stay long in the group.
http://groups.google.com/group/VU-Study-Corner/web/group-rules
 
You received this message because you are subscribed to the Google
Groups "VU Study Corner" group.
To post to this group, send email to VU-Study-Corner@googlegroups.com
To unsubscribe from this group, send email to
VU-Study-Corner+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/VU-Study-Corner?hl=en

--
You received this message because you are subscribed to the Google Groups "Virtual University of Pakistan" group.
To post to this group, send email to discussion_vu@googlegroups.com.
To unsubscribe from this group, send email to discussion_vu+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/discussion_vu?hl=en.

No comments:

Post a Comment

PAID CONTENT