#include<iostream>
#include<conio.h>
#include<string.h>
#include<string>


using namespace std;


class Vehicle {

protected:

	string brand;
	string model;
	string colour;
	double year;
	long double price;

	void printCarSpec() {

		cout << "The specs for this car: \n\n";
		cout << "Brand: " << brand << endl;
		cout << "Model: " << model << endl;
		cout << "Colour: " << colour << endl;
		cout << "Year: " << year << endl;
		cout << "Price: " << price << endl;
	}

};

class car1 : protected Vehicle {

public:
	
	void car1Specs() {

		brand = "BMW";
		model = "M3";
		colour = "Alpine White";
		year = 2017;
		price = 700;

		printCarSpec();
	}

};


class car2 : protected Vehicle {

public:
	void car2Specs() {

		brand = "Porsche";
		model = "911";
		year = 2020;
		colour = "Steel Grey";
		price = 900;

		printCarSpec();
	}

};

class car3 : protected Vehicle {

public:
	void car3Specs() {

		brand = "Range Rover";
		model = "Sport";
		year = 2019;
		colour = "Metallic Black";
		price = 500;

		printCarSpec();
	}


};


class Client : public Vehicle {

protected:

	string name;
	int age;
	int carChoice;
	int aggChoice;
	int numOfDays;


public:

	void userInfo() {

		cout << "\n\nName: ";
		cin >> name;

		cout << "Age: ";
		cin >> age;

		if (age < 18) {

			cout << "You do not meet the age requirements to rent a car." << endl;
		}
		else {

			cout << "\nChoose a vehicle you would like to rent below" << endl;
			cout << "\nEnter 1 for BMW M3, enter 2 for Porsche 911, enter 3 for Range Rover Sport." << endl;

			cout << "\nYour choice: ";
			cin >> carChoice;

			if (carChoice == 1)
			{
				cout << "You chose the BMW M3\n\n" << endl;
				car1 bmw;
				bmw.car1Specs();

			}
			else if (carChoice == 2) {

				cout << "You chose the Porsche 911" << endl;
				car2 porsche;
				porsche.car2Specs();
			}
			else if (carChoice == 3) {

				cout << "You chose the Range Rover Sport\n" << endl;
				car3 rover;
				rover.car3Specs();
			}
			else {
				cout << "Not a valid option." << endl;
			}
		}
	}

	void agreement() {

		cout << "\n\nAre you sure you would like to rent this car, enter 1 for yes enter 2 for no:";
		cin >> aggChoice;

		cout << "\nHow many days do you wish to rent this car?" << endl;
		cout << "Number of days: ";
		cin >> numOfDays;

		cout << "Thank you, please return the car within 2 weeks.";

	}
};


void menu() {

	cout << "Welcome to High Hills Car Rental Service" << endl;
	cout << "We offer top of the range vehicles to rent!" << endl;

	cout << "\nTERMS & CONDITIONS!" << endl;
	cout << "- You must be aged 18 years or older to rent a car" << endl;
	cout << "- The maximum length that you can rent a car with us is for 2 weeks\n" << endl;

	cout << "\nAvailable cars to rent: " << endl;

	cout << "\n1. BMW M3 ALpine White 2017" << endl;
	cout << "2. Porsche 911 Steel Grey 2020" << endl;
	cout << "3. Range Rover Sport Metalic Black 2019" << endl;

	cout << "\nFill out the details below to rent a car:\n\n" << endl;
};


int main() {


	while (1 == 1) {
     
		menu();

		Client client1;
		client1.userInfo();
		client1.agreement();

	}

	return 0;

}