Answer and Explanation:
Using Javascript:
Class PetData{
Constructor(name, age, id){
this.name= name;
this.age =age;
this.id = id;
}
print_all(){
return this.name+""+this.age+""+this.id;
}
}
Here we have defined class PetData with its constructor which would initialize the object/instance of the class when called, example:
Var catData = new PetData(sisi, 1, 2333);