Created
October 3, 2018 21:18
-
-
Save PhiHuyHoang/65351c51a1a5e989e8bcd77b46b70e58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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