Employee Object using classes


Employee Object using classes:

In this post we will tell you how to make an object in C++ using classes. In this post we have created an object of an employee with some attributes name, employee no., salary and also with behaviors display and update info (setter and getter) functions. 

Employee Object using classes code:

#include<iostream>
#include<string>
using namespace std;
class employee{
string name;
int employee_no;
float salary;
public:
employee(){
name="AbuZar";
employee_no=105;
salary=150000;
};
void display_info();
void update_info();
};
Employee Object using classes
To get the complete code click on the given download link in the download segment.

Download:

To download this code click on the given link below:

Comments

Post a Comment

Popular posts from this blog

How to Run Assembly Language Programming Code In Visual Studio 2019

How to Display Table of any Number in Assembly Language

How to Display Character in Assembly language