Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IPerson p1 = new Person("Ivan");
- string name = p1.GetName();
- Console.WriteLine(name); // Ivan
- // ---------------------------------
- Person p2 = new Person("Ivan");
- Console.WriteLine(p2); // Ivan
- // ---------------------------------
- IStudent student1 = new Student("Ivan", "Harvard");
- student1.AddCourse("Mathematics");
- student1.AddCourse("Literature");
- Console.WriteLine(student1);
- // Ivan, Harvard
- // Mathematics, Literature
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement