I'm new to programming and got a task to do, but I'm kinda confused how to use the boolean function and how to understand the parameter.
I get into it for the most part when I see a starting point, but for "CustomerAisOlder" and "CustomerHasBirthdayToday" I'm kinda lost how to get it started.
#include <iostream>
#include <string>
using namespace std;
// Create a new project with a class named "Customer"
class Customer {
public:
string firstname;
string surname;
string email;
int dayOfBirth;
int monthOfBirth;
int yearOfBirth;
int age;
void birthday() {
cout << "Input your birthday (DD/MM/YYYY): " << endl;
cin >> dayOfBirth;
cin >> monthOfBirth;
cin >> yearOfBirth;
}
void inputAge() {
cout << "Enter your age: " << endl;
cin >> age;
}
void displayBirthday() {
cout << "Birthday: " << dayOfBirth << "." << monthOfBirth << "." << yearOfBirth << endl;
}
};
// Check if Customer A is older than Customer B
bool CustomerAisOlder(Customer A, Customer B)
{
}
// Check if Customer has birthday today
bool CustomerHasBirthdayToday(int currentDay, int currentMonth , int currentYear)
{
}
int main() {
// Object
Customer customer1;
customer1.firstname = "John";
customer1.surname = "Thompson";
customer1.email = "Johnny318@gmail.com";
customer1.birthday();
cout << "\nName: " << customer1.firstname << " " << customer1.surname << endl;
cout << "E-Mail: " << customer1.email << endl;
customer1.displayBirthday();
}