


If the raise percentage is less than zero, the member function should display an error message. Write a java program to Generate Employee Salary slip Using Class and Object. Similarly check basic salary and compute hra and da accordingly. Ryba, Data Structures and Program Design in C++. If basicsalary < 10000 then, hra basicsalary 0.8 and da basicsalary 0.2. C program to display employee details in the order of salary from file employee. Store it in some variable say basicsalary. Data members such as empid, emp name, basic salary and allowances are added as private. Before calculating the raise, the member function should verify that the raise percentage is greater than or equal to zero. Step by step descriptive logic to find gross salary of an employee.


The member function should calculate an employee objects new salary, based on a raise percentage provided by the program using the object. Transcribed image text: Write a C program to generate the pay slip for the newly joined employees using functions. The other member function should allow the program to view the contents of the employee name data member.ģ) Add another member function to the Employeeclass. One member function should allow any program using an employee object to view the contents of the salary data member. The class contains two member functions: the constructor and a function that allows a program to assign values to the data members.Ģ) Add two member functions to the Employee class. Add Complex Number Using Structure & Pointer Add Two Complex Number Using Structure, Typedef & Pointer. So basically first we calculate a DA, and HRA after that we add basic salary + HRA +DA so, in this way, we can find the Gross salary of an employee.1) Write the class definition for a class named Employee with name and salary as employee objects. C program to display employee details in the order of salary from file employee.txt which store employee name, id and salary. To find a gross salary of an Employee we need to calculate DA and HRA then the Sum Of Basic Salary + HRA + DA. See Also C Program For Find The Gross Salary of An Employee
