Question: Create two classes with the following features: 1) One class is a parent class and contains: a) Two instance variables b) A two-parameter constructor that
Create two classes with the following features:
1) One class is a parent class and contains:
a) Two instance variables
b) A two-parameter constructor that sets the instance variables
c) A virtual instance method that displays the values of the two instance variables in the parent class
2) One class is a child class that inherits from the parent class and contains:
a) One instance variable
b) A three-parameter constructor that sets the instance variable with one parameter and calls the parent constructor using the other two parameters as arguments
c) An override instance method that displays the value of the instance variable and calls the virtual method of the parent class
Please use language C sharp to answer the question
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
