static void Main(string[] args) { Employee emp01 = new Employee("Ronaldo", "Cristiano", "60031", new DateTime(2008, 12, 25)); SalariedEmployee emp02 = new SalariedEmployee("Lionel", "Messi", "10000", new DateTime(1998, 09, 12), 200); PartTimeEmployee emp03 = new PartTimeEmployee("David", "Beckham", "00021", new DateTime(2000, 10, 09), 14); emp01.WriteToConsole(); Console.WriteLine("\n"); emp02.WriteToConsole(); Console.WriteLine("\n"); emp03.WriteToConsole(); Console.WriteLine("\n"); }
static void Main(string[] args) { //creating and displaying employee class Employee emp = new Employee("Spike", "Spiegel", new DateTime(1997, 9, 15), "0125"); emp.WriteToConsole(); Console.WriteLine("\n"); //creating and displaying salaried employee class SalariedEmployee salEmp = new SalariedEmployee("Jet", "Black", new DateTime(2004, 8, 24), "1250", 70000); salEmp.WriteToConsole(); Console.WriteLine("\n"); //creating and displaying part time employee class PartTimeEmployee partEmp = new PartTimeEmployee("Faye", "Valentine", new DateTime(2008, 3, 5), "2115", 20.75); partEmp.WriteToConsole(); Console.WriteLine("\n"); }