Package bcu.cmp5332.bookingsystem.model
Class Customer
java.lang.Object
bcu.cmp5332.bookingsystem.model.Customer
Represents a customer of the flight booking system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBooking
(Booking booking) Adds a booking to the list of bookings made by the customer.Retrieves a copy of the list of bookings made by the customer.boolean
Checks if the customer is deleted from the system.Retrieves a short string representation of the customer's details.getEmail()
Retrieves the email address of the customer.int
getId()
Retrieves the unique identifier of the customer.getName()
Retrieves the name of the customer.getPhone()
Retrieves the phone number of the customer.Retrieves a detailed string representation of the customer's details and bookings.boolean
isVIP()
void
Marks the customer as deleted from the system.void
Sets the email address of the customer.void
setId
(int id) Sets the unique identifier of the customer.void
Sets the name of the customer.void
Sets the phone number of the customer.void
Prints detailed information about the customer and their bookings to the console.
-
Constructor Details
-
Customer
Constructs a new Customer object with the specified attributes.- Parameters:
id
- The unique identifier of the customername
- The name of the customerphone
- The phone number of the customeremail
- The email address of the customerisDeleted
- Indicates whether the customer is deleted from the system
-
-
Method Details
-
getId
public int getId()Retrieves the unique identifier of the customer.- Returns:
- The unique identifier of the customer
-
setId
public void setId(int id) Sets the unique identifier of the customer.- Parameters:
id
- The new unique identifier to be set for the customer
-
getName
Retrieves the name of the customer.- Returns:
- The name of the customer
-
setName
Sets the name of the customer.- Parameters:
name
- The new name to be set for the customer
-
getPhone
Retrieves the phone number of the customer.- Returns:
- The phone number of the customer
-
setPhone
Sets the phone number of the customer.- Parameters:
phone
- The new phone number to be set for the customer
-
getEmail
Retrieves the email address of the customer.- Returns:
- The email address of the customer
-
setEmail
Sets the email address of the customer.- Parameters:
email
- The new email address to be set for the customer
-
getBookings
Retrieves a copy of the list of bookings made by the customer.- Returns:
- A copy of the list of bookings made by the customer
-
addBooking
Adds a booking to the list of bookings made by the customer.- Parameters:
booking
- The booking to be added
-
getDetailsShort
Retrieves a short string representation of the customer's details.- Returns:
- A short string representation of the customer's details
-
showDetails
public void showDetails()Prints detailed information about the customer and their bookings to the console. -
getShowDetails
Retrieves a detailed string representation of the customer's details and bookings.- Returns:
- A detailed string representation of the customer's details and bookings
-
setDeleted
public void setDeleted()Marks the customer as deleted from the system. -
getDeleted
public boolean getDeleted()Checks if the customer is deleted from the system.- Returns:
- True if the customer is deleted, false otherwise
-
isVIP
public boolean isVIP()
-