OOP Lab # 02 MariaH yderl - OOP.docx
Document Details
Uploaded by Deleted User
Tags
Related
- Object-Oriented Programming, Lecture 06 PDF
- Object-Oriented Programming with C++ Concepts PDF
- 22316 Object-Oriented Programming using C++ Sample Question Paper PDF
- C++ Object-Oriented Programming Concepts PDF
- Object Oriented Programming with C++ PDF
- MCADD-501 Object Oriented Programming in C++ May 2022 Past Paper PDF
Full Transcript
**COLLEGE OF ELECTRICAL AND MECHANICAL ENGINEERING (NUST)** **CS -- 212: Object Oriented Programming** **[Lab \# 02: Introduction to Classes]** ==================================================== **Course Instructor:** Dr. Soyiba **Lab Instructor:** Engr. Ayesha Khanam **[LAB TASKS]** ### Cre...
**COLLEGE OF ELECTRICAL AND MECHANICAL ENGINEERING (NUST)** **CS -- 212: Object Oriented Programming** **[Lab \# 02: Introduction to Classes]** ==================================================== **Course Instructor:** Dr. Soyiba **Lab Instructor:** Engr. Ayesha Khanam **[LAB TASKS]** ### Create a class Employee, create functions for the following: a. Input Employee Details b. Display Employee Details **Code:** \#include \ using namespace std; class Employee { private: double EmployeeID; string EmployeeName; double EmployeeSalary; public: // using setter for employee details void setEmployeeID(double id) { EmployeeID = id; } void setEmployeeName(string n) { EmployeeName = n; } void setEmployeeSalary(double s) { EmployeeSalary = s; } // using getter for employee details double getEmployeeID() { return EmployeeID; } string getEmployeeName() { return EmployeeName; } double getEmployeeSalary() { return EmployeeSalary; } void displayEmpDetails() { cout \