#pragma once

#include <cstddef>
#include <string>

struct Cargo {
    size_t amount;

    auto operator<=>(const Cargo&) const = default;

    virtual size_t getPrice() const = 0;
    virtual const std::string& name() const = 0;
};

struct Fruit : public Cargo {
    size_t getPrice() const override;
    const std::string& name() const override;
};

struct Item : public Cargo {
    size_t getPrice() const override;
    const std::string& name() const override;
};

struct Alcohol : public Cargo {
    size_t getPrice() const override;
    const std::string& name() const override;
};