Question: Language is C# class Program { static void Main(String args[]) { Pet dog, cat; c) Create 2 instances (Objects) of the Pet Class for dog
Language is C#![Language is C# class Program { static void Main(String args[]) { Pet](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3cd169b657_78266f3cd16340fe.jpg)
class Program { static void Main(String args[]) { Pet dog, cat; c) Create 2 instances (Objects) of the Pet Class for dog and cat which are declared above. Use any unique hard coded (literal) values and do NOT redeclare the objects. d) Complete the code below that will display the name of dog and cat to the console Console.WriteLine("dog name is " ); Console.WriteLine("cat name is " ); (e) Complete the code below that will display the age of dog and cat to the console Console.WriteLine("dog age is " + Console.WriteLine("cat age is " + f) Write the statement below which assigns your own name to owner, which all pets is the owner of all pets } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
