Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
1. Create an inheritance hierarchy for the PetStore system. Create a class Pet with the instances petName, petLocation and petPrice and methods getName(), getLocation(), getPrice() and getSpecData(). Create a class Dog with instance dogBreed and method getSpecData(). Create a class Cat with instance catBreed and method getSpecData(). Create a class Bird with instance birdColor and method getSpecData(). Classes Dog, Cat and Bird inherit the Pet class. Override the Pet class abstract method getSpecData() in all sub classes and put appropriate printing messages in all methods. Create instances of sub classes and call their methods in main()

What I have tried:

I want answer in code fr advanced oop help me plz
Posted
Updated 3-Jul-18 1:00am
v2

Quote:
I want answer in code fr advanced oop help me plz

No.
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

This isn't difficult, just read the question, and re-read your course notes.
Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
In addition to OriginalGriff's answer...

Here is a set of MSDN articles, which may help you to write proper code:
Object-Oriented Programming (C#) | Microsoft Docs[^]
Inheritance (C# Programming Guide) | Microsoft Docs[^]
Polymorphism (C# Programming Guide) | Microsoft Docs[^]

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900