Cleaning up and adding comments

This commit is contained in:
Christopher Sanden
2025-11-18 13:23:54 +01:00
parent d1fa8eda6b
commit e77d7ff21e
14 changed files with 202 additions and 103 deletions

View File

@@ -9,7 +9,9 @@ enum ENumStatus {
EMPLOYEE
};
// Represents one person on the cruise ship.
// - 'status' tells us if they're a GUEST or EMPLOYEE
// - 'cabinSize' is random in [1, 4] and used for cabin grouping
struct TPerson {
std::string firstName;
std::string lastName;
@@ -20,6 +22,8 @@ struct TPerson {
TPerson(std::string , std::string , ENumStatus);
~TPerson() = default;
// Comparison for alphabetical sorting:
// primary key: lastName, secondary key: firstName.
bool operator<(const TPerson& other) const
{
if (lastName < other.lastName) return true;