Question: in C++. i proved instructions and given code for this /**** Employee.cpp MUST BE USED CALLED TO lab3.cpp *****/ #ifndef EMPLOYEE_H #define EMPLOYEE_H #include #include
in C++. i proved instructions and given code for this
/**** Employee.cpp MUST BE USED CALLED TO lab3.cpp *****/
#ifndef EMPLOYEE_H #define EMPLOYEE_H
#include
using namespace std;
class Employee { private: string name; int id; string dept;
public:
Employee():name(""),id(0),dept("") {}
Employee(const string &name, int id, const string &dept):name(name),id(id),dept(dept) {}
string get_name() const { return name; }
int get_id() const { return id; }
string get_dept() const { return dept; }
void set_dept(const string &dept) { this->dept = dept; }
void set_name(const string &name) { this->name = name; }
void set_id(int id) { this->id = id; }
void print() const { std::cout
friend ostream &operator
friend bool operator== (const Employee &e1, const Employee &e2) { return (e1.name == e2.name && e1.id == e2.id && e1.dept == e2.dept); }
friend bool operator!= (const Employee &e1, const Employee &e2) { return !(e1.name == e2.name && e1.id == e2.id && e1.dept == e2.dept); }
}; #endif
// LinkedList.cpp #ifndef LL_H #define LL_H #include
NodeType(): data(), next(nullptr) {} NodeType(const T& d): data(d), next(nullptr) {} }; public: // Default constructor LinkedList(): size(0) { head = new NodeType(); }
//Destructor ~LinkedList() { clear(); delete head; } // returns true if the linked list is empty bool empty( ) const { } // Returns the list to the empty state. void clear() { }
// Returns the number of items in the list. int get_size() const { } // Checks if item is in the list. bool find(const T& item) const { } // Inserts item at the front. void push_front(const T& item) { }
// Removes the first item. void pop_front() { if (head->next != nullptr) { } } // Prints the list. void print() const { } public: class iterator { public: iterator(): current(nullptr) { }
T& operator*() { return current->data; }
iterator& operator++() { current = current->next; return *this; }
bool operator==(const iterator& rhs) const { return current == rhs.current; } bool operator!=(const iterator& rhs) const { return !(*this == rhs); }
private: NodeType* current;
friend class LinkedList; }; iterator begin() { iterator itr; itr.current = head->next; return itr; }
iterator end() { iterator itr; itr.current = nullptr; return itr; } private: int size; // the size of the linked list. NodeType* head; // points to the header node. }; #endif





Write a program that includes the following Define and implement the dos PIE ha HA 4:10 * linkedlist.pdf 2 of 4 - ht . Meedchelly Theme Th . 16 4:10 linkedlist.pdf Powered the comments can fully and implement che ELLO The si function 1 Declares a linked list which stores integers 2 Properties to enter in values and paid these values in the linked list stupiding the values in the Prits the worked it Print the values in the linked it Promper er stora valere, and dirty linked 6 Preset to cater the music of sales to be one and evaluate the front Fun 10 salt wings and d that time in the linked list. 12 Oding the string him the w 10. Pre the heat 11 Prewer helt 12. Pompreender (e number of strings to be meant senuwe strings to the the Prints the rings stored in the linked lidt 14 Declares.linked list which temployees the Employee class apted with this lama 15 Pumper teater employee'empresamente employees in the linked t. plain when the enteri 19 16 Progether employees to be veddemployees from the 19 Print the employees tored in the linked list The New TEL 18! they 18 The The . Cat lebih The TA C 12. Mary There The The best in 2 #ifndef EMPLOYEE_H #define EMPLOYEE_H #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
