// © Copyrights 2026 Praajna Pattada

#include <iostream>
#include <string>
#include <cstring> // Required for the function strcpy()
#include <limits>

template <typename A>
class TemplateClass
{
    public:
        A variable1 {};
        A variable2 {};
        char Name[15] {};
        void DisplayValues();
};

template <typename A>
void TemplateClass<A>::DisplayValues()
{
    std::cout << "The variables of " << Name << " have the following values:" << '\n' << '\n';
    std::cout << variable1 << '\n' << variable2 << '\n' << "_________________" << '\n';
}

int main()
{
    TemplateClass<float> Object1;
    TemplateClass<int> Object2;

    strcpy(Object1.Name, "Object 1");
	Object1.variable1 = 1.01f;
    Object1.variable2 = 2.0f;
    Object1.DisplayValues();

    strcpy(Object2.Name, "Object 2");
	Object2.variable1 = 4;
    Object2.DisplayValues();
    
    std::cin.clear();
    std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
    std::cin.get();
    return 0;
}
