-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrarian.cpp
More file actions
20 lines (16 loc) · 875 Bytes
/
Copy pathLibrarian.cpp
File metadata and controls
20 lines (16 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "../include/Librarian.h"
#include <iostream>
Librarian::Librarian(std::string userId, std::string password, std::string name,
std::string email, std::string phone, std::string empId, std::string shift)
: User(userId, password, UserRole::LIBRARIAN, name, email, phone),
employeeId(empId.empty() ? "EMP-" + userId : empId), shiftHours(shift) {}
std::string Librarian::getEmployeeId() const { return employeeId; }
std::string Librarian::getShiftHours() const { return shiftHours; }
void Librarian::setShiftHours(const std::string& shift) { shiftHours = shift; }
void Librarian::displayDetails() const {
std::cout << "[Librarian ID]: " << userId
<< " | [Emp ID]: " << employeeId
<< " | [Shift]: " << shiftHours
<< " | [Name]: " << name
<< " | [Email]: " << email << "\n";
}