#include <iostream>
using namespace std;
// define the class car
class car{
      public:
            string company;
            string color;
            int maxSpeed;
      public:
      void PrintData() {
      cout<<"the company of the car is "<<company<<endl;
      cout<<"the color of the car is "<<color<<endl;
      cout<<"the maximum speed of the car in KM/h is "<<maxSpeed;
      }
};
int main() {
      car ob;
      ob.company="Toyota";
      ob.color="red";
      ob.maxSpeed=200;
      ob.PrintData();
      return 0;
}
===================================================================================
========
#include <iostream>
using namespace std;
// define the class car
class car{
      private:
            string company;
            string color;
            int maxSpeed;
      public:
      void takeData(){
            cout<<"please enter the company of the car= ";
            cin>>company;
            cout<<"please enter the color of the car= ";
            cin>>color;
            cout<<"eneter the maximum spped of the car=";
            cin>>maxSpeed;
                  }
      void PrintData() {
      cout<<"the company of the car is "<<company<<endl;
      cout<<"the color of the car is "<<color<<endl;
      cout<<"the maximum speed of the car in KM/h is "<<maxSpeed;
      }
};
int main() {
      car x;
    x.takeData();
    x.PrintData();
      return 0;
}