Example #1
0
        static void Main(string[] args)
        {
            Console.Write("Please enter the employee's first name: ");
            string fname = Console.ReadLine();

            Console.Write("Please enter the employee's last name: ");
            string lname = Console.ReadLine();

            Console.Write($"Please enter {fname}'s tax rate: ");
            double tax = double.Parse(Console.ReadLine());

            Console.Write($"Please enter {fname}'s Gross annual income: ");
            double gross = double.Parse(Console.ReadLine());

            Employee p1 = new Employee(fname, lname, tax, gross);


            Console.WriteLine($"Name: {p1.Fname} {p1.Lname}\nTax: {p1.Tax}%\nGross Salary: {p1.Gross}\nNet Salary: {p1.Net()}");
        }