Skip to content

Instantly share code, notes, and snippets.

@PhiHuyHoang
Created October 3, 2018 21:18
Show Gist options
  • Save PhiHuyHoang/65351c51a1a5e989e8bcd77b46b70e58 to your computer and use it in GitHub Desktop.
Save PhiHuyHoang/65351c51a1a5e989e8bcd77b46b70e58 to your computer and use it in GitHub Desktop.
class Party
{
public void Cost()
{
Console.WriteLine("Detail: Party, Price: 200");
}
}
class PartyWithAlcohol
{
public void Cost()
{
Console.WriteLine("Detail: Party and Alcohol, Price: 250");
}
}
class PartyWithAlcoholAndGirl
{
public void Cost()
{
Console.WriteLine("Detail: Party and Alcohol and Girl, Price: 1250");
}
}
class Program
{
static void Main(string[] args)
{
Party A = new Party();
A.Cost();
PartyWithAlcohol B = new PartyWithAlcohol();
B.Cost();
PartyWithAlcoholAndGirl C = new PartyWithAlcoholAndGirl();
C.Cost();
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment