static void Main(string[] args) { //ClubMember NewMember = new NormalMember(); //ClubMember clubMember = new NormalMember("Excellence", "Hadassah", 1, 2018); //NormalMember mem_1 = new NormalMember("Special rate","Ethan", 10, 2008); //VIPMember mem_2 = new VIPMember("Annabel", 13, 2005); //mem_1.CalculateAnnualFee(); //mem_2.CalculateAnnualFee(); ClubMember[] newMember = new ClubMember[5]; newMember[0] = new NormalMember("Excellence", "Hadassah", 1, 2018); newMember[1] = new NormalMember("Excellence", "Elkanah", 1, 2018); newMember[2] = new VIPMember("Mirabel", 1, 2018); newMember[3] = new NormalMember("Excellence", "Ethan", 1, 2018); newMember[4] = new VIPMember("Annabel", 1, 2018); foreach (ClubMember mem in newMember) { mem.CalculateAnnualFee(); Console.WriteLine(mem.ToString()); } point2D points = new point2D(3, -2); MyStruct myStruct = new MyStruct(); point2d.PrintPoint(); //Console.WriteLine(mem_1.ToString()); //Console.WriteLine(mem_2.ToString()); Console.ReadKey(); }
public void TryToChangePoint(point2D p) { p.X++; p.Y++; }
public void PrintPoint(point2D p) { Console.WriteLine("({0}, {1})", p.X, p.Y); }