Question: Create a class named Pet, which has the following properties: name - the name property holds the name of a pet type - the type
Create a class named Pet, which has the following properties:
name - the name property holds the name of a pet
type - the type property holds the type of animal that a pet is. example values are "dog", "cat", "bird"
age - the age property holds the pets age
Demonstrate the class in an application that creates an object of the class and lets the user enter the name, type, and age of his or her pet. this data should be stored in the object. retrieve the pets name, type, and age properties and display their values on the screen.
This must be done in C# and this question has been asked previously but I am confused as to how to make the object of the class. screenshots of the code in visual studios would be helpful to show exactly how everything links together. thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
