Conference Registration 2024.07.18.04
Loading...
Searching...
No Matches
Registration Class Referenceabstract

The Registration class represents a registration for an event. More...

#include <registration.h>

Inheritance diagram for Registration:
GuestRegistration StandardRegistration StudentRegistration

Public Member Functions

virtual ~Registration ()=default
 Destructor.
 
Person getAttendee () const
 Get the attendee associated with the registration.
 
QDate getBookingDate () const
 Get the booking date of the registration.
 
virtual double calculateFee () const =0
 Calculate the fee for the registration.
 
virtual QString toString () const
 Convert the registration information to a string representation.
 
void setBookingDate (const QDate &newBookingDate)
 Set the booking date of the registration.
 

Static Public Attributes

static constexpr double STANDARD_FEE = 100.00
 

Protected Member Functions

 Registration (const Person &attendee, const QDate &bookingDate)
 Constructor.
 

Detailed Description

The Registration class represents a registration for an event.

This class is an abstract base class that provides common functionality for event registrations. It contains information about the attendee, booking date, and fee calculation.

Constructor & Destructor Documentation

◆ Registration()

Registration::Registration ( const Person & attendee,
const QDate & bookingDate )
protected

Constructor.

Parameters
attendeeThe attendee associated with the registration.
bookingDateThe booking date of the registration.

Member Function Documentation

◆ calculateFee()

virtual double Registration::calculateFee ( ) const
pure virtual

Calculate the fee for the registration.

Returns
The calculated fee.

This is a pure virtual function that must be implemented by derived classes.

Implemented in GuestRegistration, StandardRegistration, and StudentRegistration.

◆ getAttendee()

Person Registration::getAttendee ( ) const

Get the attendee associated with the registration.

Returns
The attendee.

◆ getBookingDate()

QDate Registration::getBookingDate ( ) const

Get the booking date of the registration.

Returns
The booking date.

◆ setBookingDate()

void Registration::setBookingDate ( const QDate & newBookingDate)

Set the booking date of the registration.

Parameters
newBookingDateThe new booking date.

◆ toString()

QString Registration::toString ( ) const
virtual

Convert the registration information to a string representation.

Returns
The string representation of the registration.

Reimplemented in GuestRegistration, StandardRegistration, and StudentRegistration.


The documentation for this class was generated from the following files: