Cs304 assignment 1 solution 2022

#include<iostream>

using namespace std;

class employee

   string name;

   int id,basic_salary,cn_allowance,hr_allowance,tax_deduction,gross_salary;

   public:

   void enter_data(){

   cout<<"_________________________________\n";

   cout<<"enter employee Id: ";

   cin>>id;

   cout<<"enter employee name: ";

   cin>>name;

   cout<<"enter basic salary of the employee: ";

   cin>>basic_salary;

   cout<<"__________________________________\n";

}

void calculate_salary()

{

cn_allowance = 0.35 * basic_salary;

hr_allowance = 0.50 * basic_salary;

tax_deduction = (1.5 * basic_salary)/100;

gross_salary =( basic_salary + cn_allowance +hr_allowance)- tax_deduction;

}

string getName()

{

return name;

}

int getid()

{

    return id;

}

int getsalary()

{

return basic_salary;

}

int getconvenyenceAllowance()

{

return cn_allowance;

}

int gethrAllowance()

{

return hr_allowance;

}

int gettax()

{

return tax_deduction;

}

int getgrosssalary()

{

return gross_salary;

}

};

int main()

{

string my_vu_id = "<Bc200000000>";

cout<<"assignment submitted by "<<my_vu_id<<endl;

employee * emp = new employee[3];

for(int i=0; i<3; i++)

{

emp[i].enter_data();

emp[i].calculate_salary();

}

for(int i=0; i<3; i++)

{

cout<<"-----------------------------------\n";

cout<<"Employee Id: "<<emp[i].getid()<<endl;

cout<<"Employee name: "<<emp[i].getName()<<endl;

cout<<"Employee Basic salary: "<<emp[i].getsalary()<<endl;

cout<<"Employee house rent allowance: "<<emp[i].gethrAllowance()<<endl;

    cout<<"Employee conveyance store: "<<emp[i].getconvenyenceAllowance()<<endl;

    cout<<"Employee tax deduction: "<<emp[i].gettax()<<endl;

    cout<<"Employee gross salary: "<<emp[i].getgrosssalary()<<endl;

    

}

return 0;

}








CS304 Assignment 1 | Cs304 assignment 1 solution 2022 | cs304 bscs assignment 2022 | Sir Yousaf cs304 assignment spring 2022,cs304 assignment solution 2022,cs304 assignment 1,cs304 assignment 1 solution 2022,cs304 assignment no 1 solution 2022,cs304 assignment solution spring 2022,cs304 assignment 1 solution spring 2022,cs304 assignment 1 solution,solution cs304 assignment 1,cs304 assignment no 1 solution spring 2022,vu assignment,assignment solution spring 2022,cs304 assignment 1 complete solution spring 2022,cs304 assignment 1 complete solution cs304 assignment 1 solution 2022,cs304 assignment 1 2022,cs304 assignment 1,cs304 assignment 1 solution,cs304p assignment 1 solution 2022,cs304p assignment 1 spring 2022 solution,cs304p assignment 1 solution,cs304 assignment no 1,cs304 assignment 2 solution 2022,cs304 assignment solution,cs304 assignment 1 solution spring 2022,cs304p assignment 1,cs304 assignment,cs304p assignment 1 2022,cs304 assignment 1 spring 2022,cs304 assignment 1 solution2022 CS304 Assignment 1 Solution Spring 2022 By Abid Farooq Bhutta CS304 Assignment No.1 Spring 2022 100% Correct Complete Solution By Abid Farooq Bhutta. CS304 Assignment 1 Complete Correct Solution Solved 2022 || Spring 2022 CS304 Solution Assignment No.1 2022 || Complete Correct Spring 2022 Solved. CS304 Assignment 1 Complete Solution Spring 2022, CS304 Assignment 1 Complete Solution, CS304 Assignment 1, CS304 , CS304 Assignment 1 solution, CS304 assignment Spring 2022, CS304 assignment solution Spring 2022, CS304 assignment, Assignment 1 CS304 solution, solution CS304 Assignment 1, CS304 Assignment 1 solution 2022, CS304 assignment solution 2022, CS304 Assignment 1, CS304 Assignment 1 solution Spring 2022, CS304 Assignment no 1 solution Spring 2022, CS304 Assignment no 1 solution 2022, CS304 2nd assignment solution 2022, CS304 1st assignment solution, CS304 1st assignment solution Spring