Problem Statement:
A lab to follow the LSP principle while doing your code in C#.
Hierarchy Class (Voter Class):
// Voter Class
public class Voter
{
public void vote()
{
Console.WriteLine("Voter is casting a vote");
}
}
// AdultVoter Class
public class AdultVoter : Voter
{
// Inherits vote() method from Voter
}
// UnderageVoter Class
public class UnderageVoter : Voter
{
// Underage voters cannot vote, but still inherit vote() method
}
Lab Objective:
Upon completion of this lab, you will be able to:
Prerequisites
You should install the following software on your machine: