#include <iostream>
#include <string>

using namespace std;

// Base class Vehicle
class Vehicle {
protected:
    double mileage;
    double price;

public:
    Vehicle(double m, double p) : mileage(m), price(p) {}

    virtual void display() const {
        cout << "Mileage: " << mileage << " km/l, Price: $" << price << endl;
    }
};

// Subclass Car
class Car : public Vehicle {
protected:
    double ownershipCost;
    int warranty;
    int seatingCapacity;
    string fuelType;

public:
    Car(double m, double p, double oc, int w, int sc, const string& ft)
        : Vehicle(m, p), ownershipCost(oc), warranty(w), seatingCapacity(sc), fuelType(ft) {}

    void display() const override {
        Vehicle::display();
        cout << "Ownership Cost: $" << ownershipCost << ", Warranty: " << warranty 
             << " years, Seating Capacity: " << seatingCapacity << ", Fuel Type: " << fuelType << endl;
    }
};

// Subclass Bike
class Bike : public Vehicle {
protected:
    int numCylinders;
    int numGears;
    string coolingType;
    string wheelType;
    double fuelTankSize;

public:
    Bike(double m, double p, int nc, int ng, const string& ct, const string& wt, double fts)
        : Vehicle(m, p), numCylinders(nc), numGears(ng), coolingType(ct), wheelType(wt), fuelTankSize(fts) {}

    void display() const override {
        Vehicle::display();
        cout << "Number of Cylinders: " << numCylinders << ", Number of Gears: " << numGears 
             << ", Cooling Type: " << coolingType << ", Wheel Type: " << wheelType 
             << ", Fuel Tank Size: " << fuelTankSize << " inches" << endl;
    }
};

// Subclass Audi of Car
class Audi : public Car {
    string modelType;

public:
    Audi(double m, double p, double oc, int w, int sc, const string& ft, const string& mt)
        : Car(m, p, oc, w, sc, ft), modelType(mt) {}

    void display() const override {
        Car::display();
        cout << "Model Type: " << modelType << endl;
    }
};

// Subclass Ford of Car
class Ford : public Car {
    string modelType;

public:
    Ford(double m, double p, double oc, int w, int sc, const string& ft, const string& mt)
        : Car(m, p, oc, w, sc, ft), modelType(mt) {}

    void display() const override {
        Car::display();
        cout << "Model Type: " << modelType << endl;
    }
};

// Subclass Bajaj of Bike
class Bajaj : public Bike {
    string makeType;

public:
    Bajaj(double m, double p, int nc, int ng, const string& ct, const string& wt, double fts, const string& mt)
        : Bike(m, p, nc, ng, ct, wt, fts), makeType(mt) {}

    void display() const override {
        Bike::display();
        cout << "Make Type: " << makeType << endl;
    }
};

// Subclass TVS of Bike
class TVS : public Bike {
    string makeType;

public:
    TVS(double m, double p, int nc, int ng, const string& ct, const string& wt, double fts, const string& mt)
        : Bike(m, p, nc, ng, ct, wt, fts), makeType(mt) {}

    void display() const override {
        Bike::display();
        cout << "Make Type: " << makeType << endl;
    }
};

int main() {
    // Create instances of Audi and Ford
    Audi myAudi(15.0, 50000, 2000, 5, 5, "Petrol", "Audi A4");
    Ford myFord(12.0, 30000, 1500, 3, 5, "Diesel", "Ford Mustang");

    // Create instances of Bajaj and TVS
    Bajaj myBajaj(50.0, 1500, 1, 5, "Air", "Alloys", 13.0, "Bajaj Pulsar");
    TVS myTVS(55.0, 1200, 1, 4, "Oil", "Spokes", 12.5, "TVS Apache");

    // Display details
    cout << "Audi Car Details:" << endl;
    myAudi.display();
    cout << endl;

    cout << "Ford Car Details:" << endl;
    myFord.display();
    cout << endl;

    cout << "Bajaj Bike Details:" << endl;
    myBajaj.display();
    cout << endl;

    cout << "TVS Bike Details:" << endl;
    myTVS.display();

    return 0;
}
