// Owen Sullivan, Lucia Wang, Geeth Chilukuri
// CPSC 1021-001
// Lab 5

// Invoice.cpp worked on by Lucia Wang (primary), Owen Sullivan (secondary)

// Include statements
#include <iostream>

// Include custom header files
#include "CustomerType_Employee.h"
#include "CustomerType_Student.h"
#include "CustomerType_Vendor.h"
#include "VehicleType_Car.h"
#include "VehicleType_Truck.h"
#include "VehicleType_Motorcycle.h"
#include "Invoice.h"

// Declare std namespace
using namespace std;

// Getter functions

double Invoice::getAnnualPermitBasePrice() {

    return annualPermitBasePrice;

}

double Invoice::getSemesterPermitBasePrice() {

    return semesterPermitBasePrice;

}

double Invoice::getOneDayPermitBasePrice() {

    return oneDayPermitBasePrice;

}

double Invoice::getParkAndRidePermitBasePrice() {

    return parkAndRidePermitBasePrice;

}

double Invoice::getEmployeeAddedPrice() {

    return employeeAddedPrice;

}

double Invoice::getStudentAddedPrice() {

    return studentAddedPrice;

}

double Invoice::getVendorAddedPrice() {

    return vendorAddedPrice;

}

double Invoice::getProfessorDiscount() {

    return professorDiscount;

}

double Invoice::getTenuredDiscount() {

    return tenuredDiscount;

}

double Invoice::getResidentFee() {

    return residentFee;

}

double Invoice::getTAdiscount() {

    return TAdiscount;

}

double Invoice::getFoodServiceDiscount() {

    return foodServiceDiscount;

}

double Invoice::getConstructionDiscount() {

    return constructionDiscount;

}

double Invoice::getCarAddedPrice() {

    return carAddedPrice;

}

double Invoice::getTruckAddedPrice() {

    return truckAddedPrice;

}

double Invoice::getMotorcycleAddedPrice() {

    return motorcycleAddedPrice;

}

double Invoice::getElectricDiscount() {

    return electricDiscount;

}

double Invoice::getCompactDiscount() {

    return compactDiscount;

}

double Invoice::getWideFee() {

    return wideFee;

}

double Invoice::getDieselFee() {

    return dieselFee;

}

double Invoice::getMopedDiscount() {

    return mopedDiscount;

}

double Invoice::getTwoSeaterFee() {

    return twoSeaterFee;

}

// Overloaded calculation functions (one for each combination of CustomerType and VehicleType classes, for pass by reference)

double Invoice::calcTotal(char permitTypeInput, CustomerType_Employee &customerTypeObject, VehicleType_Car &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getEmployeeAddedPrice();

    if (customerTypeObject.getIsProfessor()) {
        total = total - getProfessorDiscount();
    }
    if (customerTypeObject.getIsTenured()) {
        total = total - getTenuredDiscount();
    }

    total = total + getCarAddedPrice();

    if (vehicleTypeObject.getIsElectric()) {
        total = total - getElectricDiscount();
    }
    if (vehicleTypeObject.getIsCompact()) {
        total = total - getCompactDiscount();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Employee &customerTypeObject, VehicleType_Truck &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getEmployeeAddedPrice();

    if (customerTypeObject.getIsProfessor()) {
        total = total - getProfessorDiscount();
    }
    if (customerTypeObject.getIsTenured()) {
        total = total - getTenuredDiscount();
    }

    total = total + getTruckAddedPrice();

    if (vehicleTypeObject.getIsWide()) {
        total = total + getWideFee();
    }
    if (vehicleTypeObject.getIsDiesel()) {
        total = total + getDieselFee();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Employee &customerTypeObject, VehicleType_Motorcycle &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getEmployeeAddedPrice();

    if (customerTypeObject.getIsProfessor()) {
        total = total - getProfessorDiscount();
    }
    if (customerTypeObject.getIsTenured()) {
        total = total - getTenuredDiscount();
    }

    total = total + getMotorcycleAddedPrice();

    if (vehicleTypeObject.getIsMoped()) {
        total = total - getMopedDiscount();
    }
    if (vehicleTypeObject.getIsTwoSeater()) {
        total = total + getTwoSeaterFee();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Student &customerTypeObject, VehicleType_Car &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getStudentAddedPrice();

    if (customerTypeObject.getIsResident()) {
        total = total + getResidentFee();
    }
    if (customerTypeObject.getIsTA()) {
        total = total - getTAdiscount();
    }

    total = total + getCarAddedPrice();

    if (vehicleTypeObject.getIsElectric()) {
        total = total - getElectricDiscount();
    }
    if (vehicleTypeObject.getIsCompact()) {
        total = total - getCompactDiscount();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Student &customerTypeObject, VehicleType_Truck &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getStudentAddedPrice();

    if (customerTypeObject.getIsResident()) {
        total = total + getResidentFee();
    }
    if (customerTypeObject.getIsTA()) {
        total = total - getTAdiscount();
    }

    total = total + getTruckAddedPrice();

    if (vehicleTypeObject.getIsWide()) {
        total = total + getWideFee();
    }
    if (vehicleTypeObject.getIsDiesel()) {
        total = total + getDieselFee();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Student &customerTypeObject, VehicleType_Motorcycle &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getStudentAddedPrice();

    if (customerTypeObject.getIsResident()) {
        total = total + getResidentFee();
    }
    if (customerTypeObject.getIsTA()) {
        total = total - getTAdiscount();
    }

    total = total + getMotorcycleAddedPrice();

    if (vehicleTypeObject.getIsMoped()) {
        total = total - getMopedDiscount();
    }
    if (vehicleTypeObject.getIsTwoSeater()) {
        total = total + getTwoSeaterFee();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Vendor &customerTypeObject, VehicleType_Car &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getVendorAddedPrice();

    if (customerTypeObject.getIsFoodService()) {
        total = total - getFoodServiceDiscount();
    }
    if (customerTypeObject.getIsConstruction()) {
        total = total - getConstructionDiscount();
    }

    total = total + getCarAddedPrice();

    if (vehicleTypeObject.getIsElectric()) {
        total = total - getElectricDiscount();
    }
    if (vehicleTypeObject.getIsCompact()) {
        total = total - getCompactDiscount();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Vendor &customerTypeObject, VehicleType_Truck &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getVendorAddedPrice();

    if (customerTypeObject.getIsFoodService()) {
        total = total - getFoodServiceDiscount();
    }
    if (customerTypeObject.getIsConstruction()) {
        total = total - getConstructionDiscount();
    }

    total = total + getTruckAddedPrice();

    if (vehicleTypeObject.getIsWide()) {
        total = total + getWideFee();
    }
    if (vehicleTypeObject.getIsDiesel()) {
        total = total + getDieselFee();
    }

    return total;

}

double Invoice::calcTotal(char permitTypeInput, CustomerType_Vendor &customerTypeObject, VehicleType_Motorcycle &vehicleTypeObject) {

    double total = 0.0;

    if (permitTypeInput == 'A') {
        total = total + getAnnualPermitBasePrice();
    } else if (permitTypeInput == 'S') {
        total = total + getSemesterPermitBasePrice();
    } else if (permitTypeInput == 'O') {
        total = total + getOneDayPermitBasePrice();
    } else if (permitTypeInput == 'P') {
        total = total + getParkAndRidePermitBasePrice();
    }

    total = total + getVendorAddedPrice();

    if (customerTypeObject.getIsFoodService()) {
        total = total - getFoodServiceDiscount();
    }
    if (customerTypeObject.getIsConstruction()) {
        total = total - getConstructionDiscount();
    }

    total = total + getMotorcycleAddedPrice();

    if (vehicleTypeObject.getIsMoped()) {
        total = total - getMopedDiscount();
    }
    if (vehicleTypeObject.getIsTwoSeater()) {
        total = total + getTwoSeaterFee();
    }

    return total;

}

// Overloaded print functions (one for each combination of CustomerType and VehicleType classes, for pass by reference)

void Invoice::printInvoice(char permitTypeInput, CustomerType_Employee &customerTypeObject, VehicleType_Car &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Employee ($" << getEmployeeAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsProfessor()) {
        cout << "Professor discount applied: Yes ($" << getProfessorDiscount() << ")" << endl;
    } else {
        cout << "Professor discount applied: No" << endl;
    }

    if (customerTypeObject.getIsTenured()) {
        cout << "Tenured discount applied: Yes ($" << getTenuredDiscount() << ")" << endl;
    } else {
        cout << "Tenured discount applied: No" << endl;
    }

    cout << "Vehicle fee: Car ($" << getCarAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsElectric()) {
        cout << "Electric discount applied: Yes ($" << getElectricDiscount() << ")" << endl;
    } else {
        cout << "Electric discount applied: No" << endl;
    }

    if (vehicleTypeObject.getIsCompact()) {
        cout << "Compact discount applied: Yes ($" << getCompactDiscount() << ")" << endl;
    } else {
        cout << "Compact discount applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Employee &customerTypeObject, VehicleType_Truck &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Employee ($" << getEmployeeAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsProfessor()) {
        cout << "Professor discount applied: Yes ($" << getProfessorDiscount() << ")" << endl;
    } else {
        cout << "Professor discount applied: No" << endl;
    }

    if (customerTypeObject.getIsTenured()) {
        cout << "Tenured discount applied: Yes ($" << getTenuredDiscount() << ")" << endl;
    } else {
        cout << "Tenured discount applied: No" << endl;
    }

    cout << "Vehicle fee: Truck ($" << getTruckAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsWide()) {
        cout << "Wide fee applied: Yes ($" << getWideFee() << ")" << endl;
    } else {
        cout << "Wide fee applied: No" << endl;
    }

    if (vehicleTypeObject.getIsDiesel()) {
        cout << "Diesel fee applied: Yes ($" << getDieselFee() << ")" << endl;
    } else {
        cout << "Diesel fee applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Employee &customerTypeObject, VehicleType_Motorcycle &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Employee ($" << getEmployeeAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsProfessor()) {
        cout << "Professor discount applied: Yes ($" << getProfessorDiscount() << ")" << endl;
    } else {
        cout << "Professor discount applied: No" << endl;
    }

    if (customerTypeObject.getIsTenured()) {
        cout << "Tenured discount applied: Yes ($" << getTenuredDiscount() << ")" << endl;
    } else {
        cout << "Tenured discount applied: No" << endl;
    }

    cout << "Vehicle fee: Motorcycle ($" << getMotorcycleAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsMoped()) {
        cout << "Moped discount applied: Yes ($" << getMopedDiscount() << ")" << endl;
    } else {
        cout << "Moped discount applied: No" << endl;
    }

    if (vehicleTypeObject.getIsTwoSeater()) {
        cout << "Two-seater fee applied: Yes ($" << getTwoSeaterFee() << ")" << endl;
    } else {
        cout << "Two-seater fee applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Student &customerTypeObject, VehicleType_Car &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Student ($" << getStudentAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsResident()) {
        cout << "Resident fee applied: Yes ($" << getResidentFee() << ")" << endl;
    } else {
        cout << "Resident fee applied: No" << endl;
    }

    if (customerTypeObject.getIsTA()) {
        cout << "TA discount applied: Yes ($" << getTAdiscount() << ")" << endl;
    } else {
        cout << "TA discount applied: No" << endl;
    }

    cout << "Vehicle fee: Car ($" << getCarAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsElectric()) {
        cout << "Electric discount applied: Yes ($" << getElectricDiscount() << ")" << endl;
    } else {
        cout << "Electric discount applied: No" << endl;
    }

    if (vehicleTypeObject.getIsCompact()) {
        cout << "Compact discount applied: Yes ($" << getCompactDiscount() << ")" << endl;
    } else {
        cout << "Compact discount applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Student &customerTypeObject, VehicleType_Truck &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Student ($" << getStudentAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsResident()) {
        cout << "Resident fee applied: Yes ($" << getResidentFee() << ")" << endl;
    } else {
        cout << "Resident fee applied: No" << endl;
    }

    if (customerTypeObject.getIsTA()) {
        cout << "TA discount applied: Yes ($" << getTAdiscount() << ")" << endl;
    } else {
        cout << "TA discount applied: No" << endl;
    }

    cout << "Vehicle fee: Truck ($" << getTruckAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsWide()) {
        cout << "Wide fee applied: Yes ($" << getWideFee() << ")" << endl;
    } else {
        cout << "Wide fee applied: No" << endl;
    }

    if (vehicleTypeObject.getIsDiesel()) {
        cout << "Diesel fee applied: Yes ($" << getDieselFee() << ")" << endl;
    } else {
        cout << "Diesel fee applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Student &customerTypeObject, VehicleType_Motorcycle &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Student ($" << getStudentAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsResident()) {
        cout << "Resident fee applied: Yes ($" << getResidentFee() << ")" << endl;
    } else {
        cout << "Resident fee applied: No" << endl;
    }

    if (customerTypeObject.getIsTA()) {
        cout << "TA discount applied: Yes ($" << getTAdiscount() << ")" << endl;
    } else {
        cout << "TA discount applied: No" << endl;
    }

   cout << "Vehicle fee: Motorcycle ($" << getMotorcycleAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsMoped()) {
        cout << "Moped discount applied: Yes ($" << getMopedDiscount() << ")" << endl;
    } else {
        cout << "Moped discount applied: No" << endl;
    }

    if (vehicleTypeObject.getIsTwoSeater()) {
        cout << "Two-seater fee applied: Yes ($" << getTwoSeaterFee() << ")" << endl;
    } else {
        cout << "Two-seater fee applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Vendor &customerTypeObject, VehicleType_Car &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Vendor ($" << getVendorAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsFoodService()) {
        cout << "Food service discount applied: Yes ($" << getFoodServiceDiscount() << ")" << endl;
    } else {
        cout << "Food service discount applied: No" << endl;
    }

    if (customerTypeObject.getIsConstruction()) {
        cout << "Construction discount applied: Yes ($" << getConstructionDiscount() << ")" << endl;
    } else {
        cout << "Construction discount applied: No" << endl;
    }

    cout << "Vehicle fee: Car ($" << getCarAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsElectric()) {
        cout << "Electric discount applied: Yes ($" << getElectricDiscount() << ")" << endl;
    } else {
        cout << "Electric discount applied: No" << endl;
    }

    if (vehicleTypeObject.getIsCompact()) {
        cout << "Compact discount applied: Yes ($" << getCompactDiscount() << ")" << endl;
    } else {
        cout << "Compact discount applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Vendor &customerTypeObject, VehicleType_Truck &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Vendor ($" << getVendorAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsFoodService()) {
        cout << "Food service discount applied: Yes ($" << getFoodServiceDiscount() << ")" << endl;
    } else {
        cout << "Food service discount applied: No" << endl;
    }

    if (customerTypeObject.getIsConstruction()) {
        cout << "Construction discount applied: Yes ($" << getConstructionDiscount() << ")" << endl;
    } else {
        cout << "Construction discount applied: No" << endl;
    }

    cout << "Vehicle fee: Truck ($" << getTruckAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsWide()) {
        cout << "Wide fee applied: Yes ($" << getWideFee() << ")" << endl;
    } else {
        cout << "Wide fee applied: No" << endl;
    }

    if (vehicleTypeObject.getIsDiesel()) {
        cout << "Diesel fee applied: Yes ($" << getDieselFee() << ")" << endl;
    } else {
        cout << "Diesel fee applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}

void Invoice::printInvoice(char permitTypeInput, CustomerType_Vendor &customerTypeObject, VehicleType_Motorcycle &vehicleTypeObject) {

    cout << "Generated invoice:" << endl;

    cout << "Customer name: " << customerTypeObject.getName() << endl;
    cout << "Customer address: " << customerTypeObject.getAddress() << endl;
    cout << "Customer email: " << customerTypeObject.getEmail() << endl;

    cout << "Vehicle make: " << vehicleTypeObject.getMake() << endl;
    cout << "Vehicle model: " << vehicleTypeObject.getModel() << endl;
    cout << "Vehicle year: " << vehicleTypeObject.getYear() << endl;
    cout << "Vehicle license plate: " << vehicleTypeObject.getLicense() << endl;
    
    if (permitTypeInput == 'A') {
        cout << "Permit type: Annual ($" << getAnnualPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'S') {
        cout << "Permit type: Semester ($" << getSemesterPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'O') {
        cout << "Permit type: One-day ($" << getOneDayPermitBasePrice() << ")" << endl;
    } else if (permitTypeInput == 'P') {
        cout << "Permit type: Park-and-ride ($" << getParkAndRidePermitBasePrice() << ")" << endl;
    }

    cout << "Customer fee: Vendor ($" << getVendorAddedPrice() << ")" << endl;

    if (customerTypeObject.getIsFoodService()) {
        cout << "Food service discount applied: Yes ($" << getFoodServiceDiscount() << ")" << endl;
    } else {
        cout << "Food service discount applied: No" << endl;
    }

    if (customerTypeObject.getIsConstruction()) {
        cout << "Construction discount applied: Yes ($" << getConstructionDiscount() << ")" << endl;
    } else {
        cout << "Construction discount applied: No" << endl;
    }

    cout << "Vehicle fee: Motorcycle ($" << getMotorcycleAddedPrice() << ")" << endl;

    if (vehicleTypeObject.getIsMoped()) {
        cout << "Moped discount applied: Yes ($" << getMopedDiscount() << ")" << endl;
    } else {
        cout << "Moped discount applied: No" << endl;
    }

    if (vehicleTypeObject.getIsTwoSeater()) {
        cout << "Two-seater fee applied: Yes ($" << getTwoSeaterFee() << ")" << endl;
    } else {
        cout << "Two-seater fee applied: No" << endl;
    }

    cout << "Total permit price: $" << calcTotal(permitTypeInput, customerTypeObject, vehicleTypeObject) << endl;

}