0
How can I create a new class when I have many public classes Dog Cat Fish and Owner String Name age
I want to make many classes in every pet with their information about age name owner
2 odpowiedzi
+ 2
U can create only one class Animals
and create objects of this class ,dog,cat,fish
0
Create class Animal and have Dog, Cat, Fish inherit from Animal. That is a better design and adheres to object oriented programming.