-4

Write a C# program to maintain personal information and wages of employees in an organization. The “Employee” class has different attributes like first name, last name, address, email and age as well as methods, (a) to calculate the weekly earnings (salary) of each of the employees, (b) to calculate yearly gross salary of each of the employees after adding taxes in the rate of 13% for any income below NZ$ 50K, 15% for income between $50K and 80K and 18% for anything above that. The parameters to calculate the weekly earnings are passed on as arguments to the method but how you want to access any extra the parameter required to calculate the gross yearly salaries is up to you.
For three different objects created, calculate the weekly and yearly earnings of each of the employee and print the name, address, age, email, gender, weekly salary, yearly salary and yearly tax paid for each of them. For each of the objects created, individual construct1ors are called. The first constructor accepts no arguments, the second constructor only accepts first name, last name and age as arguments and the third one accept all the attributes as arguments. If any last name is a null one, then an “ArgumentException” is thrown stating the “Surname is missing”. Write a test class containing the main method to test the whole program.

Edited by deceptikon: Homework rule violation

Votes + Comments
don't expect anyone to volunteer to do your hoework for you. Show some effort and ask questions about what is giving you problerms
5
Contributors
4
Replies
34
Views
4 Years
Discussion Span
Last Post by Mike Askew
1

Ok, I wrote the code. Thanks for the exercise :)

Votes + Comments
There ought to be a price for the best answer to this kind of OP-posts!