Question
Create objects for at least 10 employees.
Answer :
Word Count : 1095
__________ ____ __________ ___ ______ _______ ____ ___ ______ _____ _____ _________.
_____ ___ ________ ________ _______.
___ _______ _____ _______ __________ _____ ___ _______ _____ _________ ________ __________.
___ _______ ___ _______ ________ __________ __________ ____.
______ ___ ___ __________ _________ ______ ____.
_______ _______ ___ _________ ____ ____.
______ __________ ________ ____ ______ _______ ______ _______.
______ ________ __________ _______ _________ _______ ____ ____ _____ ____.
___ _____ _______ _____ ______ _____.
__________ ______ ____ ___ _____ ___ ________ _______.
___ _________ ______ ______ ______ ______ ___ __________ ______ ____ ____ _____.
__________ ____ _____ ___ _________ _______ ____ ___ __________ _____ _________ ________.
________ ______ ____ ________ ___ _____ ________ _____ ____ ___ ________.
_______ ______ _______ ___ _____ ________ ______ _____ ________ _______ ________.
__________ __________ ____ ______ ________ _______ _________ __________.
_____ __________ ______ _________ ______ __________.
________ ________ _____ ___ __________ _____ __________.
________ ____ ______ _____ ____ ___ ____ __________ ______ ___ _________ __________.
________ ________ ________ _____ ______ ___ ____ _________ __________ ____ _______ ______.
_____ __________ ____ ___ ____ ___ ________ ________ _______.
_____ ______ ______ _________ _________ _________ __________ ___ ________.
__________ __________ _____ ______ _________ ____ ________ __________.
__________ ___ ___ ________ ________ ___ ______ ________ _______.
_______ _________ ________ ____ _______ _________ _________ _____ ________ ____.
_________ __________ ______ ___ _______ __________ ____ _____ _________ ______.
________ __________ _______ _________ ________ ___ ____ _______ ___.
_________ ______ ___ _____ __________ ___ _______ ___.
_________ _______ _______ _________ ___ _____ ____ _______ ____ ______ _______ _____.
__________ ___ _________ ___ ____ ______ _______ ____.
_________ _____ ___ ___ ___ ___ __________.
__________ ______ _____ _____ _______ ______ _______ ____.
_______ ______ ___ _____ _______ ____.
__________ ______ ________ ________ ______ ___.
_______ ___ ___ ___ ____.
___ _________ ______ ____ ______ __________ ______ ____ __________ _____ _______ ________.
________ __________ _____ ____ _______ _________ ______.
________ ________ _____ _____ _____ _____ _______ ______.
_________ ______ _____ ________ _____ _________ ________ ______ ______.
_________ _______ ________ __________ ________ ______ ________ __________ _______ _______ ________ _____.
__________ _______ ____ ________ _______ ________ ________ ________ ______.
_____ _________ ____ _________ __________.
____ ________ ______ _________ ___ _______ ______ __________ _____.
________ __________ ___ ________ ___ ___ ______ __________ _________ _______ _________ ________.
______ ___ ____ ______ _______ __________ __________ __________ _____.
_____ __________ _______ __________ ______ _____ ________.
___ ____ ____ _____ _________ ________ ___ ___.
__________ _________ _______ ____ _______.
_______ _________ _______ ________ ______ ___ __________ _________ _______ __________ ________ __________.
_________ ______ _________ __________ ___ _______ __________ _________ __________ ____.
________ ___ _________ ___ _____ _____ ______ _________ _________ _____.
_____ _____ ______ _____ __________ _____ _________ __________ ______ ________ ______.
____ ___ ___ _________ ______ _____ __________ ____ _____ _________ _________.
_______ _______ ______ ______ __________ _______.
__________ ______ ___ ___ ________ ___.
____ _________ ________ ___ _____ ____ ______.
___ _____ __________ _______ ________ ________ ___.
____ _______ _____ ______ _______ ____ ______.
_____ _______ _________ __________ _______ ___ _________ _______.
__________ ________ ______ ______ ______ _____ _______ _______ ___ _____ _____.
_______ _______ ____ ____ ___ __________ ______ ___ __________ ______.
___ _____ __________ _________ _________ ______.
_____ ____ __________ __________ _________ _________ _______ _________.
____ _____ _______ ___ ______ _____.
_____ ____ ____ _____ _______.
________ _________ ____ _________ _____ __________ ________ ___ _________ _________.
______ ________ ________ ________ _____ ___ _________ ___ _______ __________.
_________ ____ ____ __________ ____.
_____ ______ ______ ______ ______ _________ ________.
___ ______ ___ _________ _______ ______ _____ __________ ___ __________ ___.
__________ _______ _____ _______ _______ __________ __________ ____ _________ ___.
_________ _______ __________ _____ _________ ____.
____ ____ _______ _____ ___.
____ _____ _______ __________ ________ _______ _________ ________ _________.
_________ ________ _____ _________ _______ _______ _________ _______.
___ ______ _____ _____ _________.
___ ______ _________ ___ ________ ___ _______ ______ _______ ________ ____ ______.
________ ___ _____ _______ _________ ______.
_____ __________ ___ ___ ________ _______ _________.
____ _________ _______ _________ _________ __________ ________.
______ ____ _________ _____ _____ _____ ________ __________ ______ _________.
_________ _______ __________ ______ _______ ______ __________ _____.
______ ______ _________ _______ ________ ______ _______ _________ ____.
__________ _______ ___ ___ ___ ___ _______ ______ _________ _______ _____.
_____ ____ ____ ________ _______ ___ ________ ____ ____ __________.
_____ _________ _________ ______ ________ ________ _____.
_________ _______ __________ __________ _____ ________.
______ ______ _________ ______ __________ ____ _________ ___ ___.
____ __________ _________ _________ ________ ________ _____ _____ _______ _________.
____ _________ __________ _________ _________ ______ __________ ____ ________ ____.
____ _______ ________ ___ __________ _______ __________ _____.
________ ________ _________ _____ ____ _____ _____ ______ ______.
_________ ________ ________ __________ __________ _____ _______ ______ __________.
__________ __________ ______ ____ ________ ___ _________ __________.
Skip in 10
# Creating Objects for Employees in C++ In C++, an object is an instance of a class. A class defines the data members and member functions that describe the properties and behavior of an object. When we need to represent employees in a program, we can create an `Employee` class containing information such as employee ID, employee name, department, designation, and salary. Each employee can then be represented by a separate object of the `Employee` class. Creating objects is one of the most important concepts of object-oriented programming because it allows a program to represent real-world entities in an organized manner. Suppose an organization has at least ten employees. Instead of declaring separate variables for every property of every employee, we can create one class called `Employee` and then create ten different objects from that class. All objects will have the same structure defined by the class, but each object can contain different employee information. For example, one object may represent an employee named Amit, while another may represent an employee named Rahul. A simple C++ program for creating objects for ten employees is given below: ```cpp #include #include using namespace std; class Employee { private: int employeeId; string name; string department; string designation; double salary; public: Employee(int id, string n, string d, string des, double s) { employeeId = id; name = n; department = d; designation = des; salary = s; } void display() { cout << "Employee ID: " << employeeId << endl; cout << "Name: " << name << endl; cout << "Department: " << department << endl; cout << "Designation: " << designation << endl; cout << "Salary: " << salary << endl; cout << "-----------------------------" << endl; } }; int main() { Employee e1(101, "Amit", "IT", "Software Engineer",
_______ _________ _______ ____ _____ ____ ______.__________ ____ __________ ___ ______ _______ ____ ___ ______ _____ _____ _________.
_____ ___ ________ ________ _______.
___ _______ _____ _______ __________ _____ ___ _______ _____ _________ ________ __________.
___ _______ ___ _______ ________ __________ __________ ____.
______ ___ ___ __________ _________ ______ ____.
_______ _______ ___ _________ ____ ____.
______ __________ ________ ____ ______ _______ ______ _______.
______ ________ __________ _______ _________ _______ ____ ____ _____ ____.
___ _____ _______ _____ ______ _____.
__________ ______ ____ ___ _____ ___ ________ _______.
___ _________ ______ ______ ______ ______ ___ __________ ______ ____ ____ _____.
__________ ____ _____ ___ _________ _______ ____ ___ __________ _____ _________ ________.
________ ______ ____ ________ ___ _____ ________ _____ ____ ___ ________.
_______ ______ _______ ___ _____ ________ ______ _____ ________ _______ ________.
__________ __________ ____ ______ ________ _______ _________ __________.
_____ __________ ______ _________ ______ __________.
________ ________ _____ ___ __________ _____ __________.
________ ____ ______ _____ ____ ___ ____ __________ ______ ___ _________ __________.
________ ________ ________ _____ ______ ___ ____ _________ __________ ____ _______ ______.
_____ __________ ____ ___ ____ ___ ________ ________ _______.
_____ ______ ______ _________ _________ _________ __________ ___ ________.
__________ __________ _____ ______ _________ ____ ________ __________.
__________ ___ ___ ________ ________ ___ ______ ________ _______.
_______ _________ ________ ____ _______ _________ _________ _____ ________ ____.
_________ __________ ______ ___ _______ __________ ____ _____ _________ ______.
________ __________ _______ _________ ________ ___ ____ _______ ___.
_________ ______ ___ _____ __________ ___ _______ ___.
_________ _______ _______ _________ ___ _____ ____ _______ ____ ______ _______ _____.
__________ ___ _________ ___ ____ ______ _______ ____.
_________ _____ ___ ___ ___ ___ __________.
__________ ______ _____ _____ _______ ______ _______ ____.
_______ ______ ___ _____ _______ ____.
__________ ______ ________ ________ ______ ___.
_______ ___ ___ ___ ____.
___ _________ ______ ____ ______ __________ ______ ____ __________ _____ _______ ________.
________ __________ _____ ____ _______ _________ ______.
________ ________ _____ _____ _____ _____ _______ ______.
_________ ______ _____ ________ _____ _________ ________ ______ ______.
_________ _______ ________ __________ ________ ______ ________ __________ _______ _______ ________ _____.
__________ _______ ____ ________ _______ ________ ________ ________ ______.
_____ _________ ____ _________ __________.
____ ________ ______ _________ ___ _______ ______ __________ _____.
________ __________ ___ ________ ___ ___ ______ __________ _________ _______ _________ ________.
______ ___ ____ ______ _______ __________ __________ __________ _____.
_____ __________ _______ __________ ______ _____ ________.
___ ____ ____ _____ _________ ________ ___ ___.
__________ _________ _______ ____ _______.
_______ _________ _______ ________ ______ ___ __________ _________ _______ __________ ________ __________.
_________ ______ _________ __________ ___ _______ __________ _________ __________ ____.
________ ___ _________ ___ _____ _____ ______ _________ _________ _____.
_____ _____ ______ _____ __________ _____ _________ __________ ______ ________ ______.
____ ___ ___ _________ ______ _____ __________ ____ _____ _________ _________.
_______ _______ ______ ______ __________ _______.
__________ ______ ___ ___ ________ ___.
____ _________ ________ ___ _____ ____ ______.
___ _____ __________ _______ ________ ________ ___.
____ _______ _____ ______ _______ ____ ______.
_____ _______ _________ __________ _______ ___ _________ _______.
__________ ________ ______ ______ ______ _____ _______ _______ ___ _____ _____.
_______ _______ ____ ____ ___ __________ ______ ___ __________ ______.
___ _____ __________ _________ _________ ______.
_____ ____ __________ __________ _________ _________ _______ _________.
____ _____ _______ ___ ______ _____.
_____ ____ ____ _____ _______.
________ _________ ____ _________ _____ __________ ________ ___ _________ _________.
______ ________ ________ ________ _____ ___ _________ ___ _______ __________.
_________ ____ ____ __________ ____.
_____ ______ ______ ______ ______ _________ ________.
___ ______ ___ _________ _______ ______ _____ __________ ___ __________ ___.
__________ _______ _____ _______ _______ __________ __________ ____ _________ ___.
_________ _______ __________ _____ _________ ____.
____ ____ _______ _____ ___.
____ _____ _______ __________ ________ _______ _________ ________ _________.
_________ ________ _____ _________ _______ _______ _________ _______.
___ ______ _____ _____ _________.
___ ______ _________ ___ ________ ___ _______ ______ _______ ________ ____ ______.
________ ___ _____ _______ _________ ______.
_____ __________ ___ ___ ________ _______ _________.
____ _________ _______ _________ _________ __________ ________.
______ ____ _________ _____ _____ _____ ________ __________ ______ _________.
_________ _______ __________ ______ _______ ______ __________ _____.
______ ______ _________ _______ ________ ______ _______ _________ ____.
__________ _______ ___ ___ ___ ___ _______ ______ _________ _______ _____.
_____ ____ ____ ________ _______ ___ ________ ____ ____ __________.
_____ _________ _________ ______ ________ ________ _____.
_________ _______ __________ __________ _____ ________.
______ ______ _________ ______ __________ ____ _________ ___ ___.
____ __________ _________ _________ ________ ________ _____ _____ _______ _________.
____ _________ __________ _________ _________ ______ __________ ____ ________ ____.
____ _______ ________ ___ __________ _______ __________ _____.
________ ________ _________ _____ ____ _____ _____ ______ ______.
_________ ________ ________ __________ __________ _____ _______ ______ __________.
__________ __________ ______ ____ ________ ___ _________ __________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.