From 40187d057151b5c7b2339dc9becbbd6b0100ab34 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hypki Date: Fri, 22 Nov 2024 10:01:33 +0100 Subject: [PATCH] 'Added another call for validate();' --- ex5-library/src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ex5-library/src/main.cpp b/ex5-library/src/main.cpp index 44a56b0..71068a5 100644 --- a/ex5-library/src/main.cpp +++ b/ex5-library/src/main.cpp @@ -9,6 +9,7 @@ #include #include "Human.h" #include "Employee.h" +#include "Librarian.h" using namespace std; @@ -20,5 +21,13 @@ int main() { if (e.validate()) cout << "pesel of employee" << e.getPesel(); + lib::Librarian l = lib::Librarian(); + l.setPesel(2000000000); + if (l.validate()) + cout << "pesel of librarian" << l.getPesel(); + l.setPosition("librarian"); + if (l.validate()) + cout << "now it works, pesel of librarian" << l.getPesel(); + return 0; }