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.

TnTinMN commented: don't expect anyone to volunteer to do your hoework for you. Show some effort and ask questions about what is giving you problerms -2

Recommended Answers

All 4 Replies

How rude! You don't even make the effort to ask a decent question!

Wonderful copy+paste

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

commented: There ought to be a price for the best answer to this kind of OP-posts! +14

I didn't know DaniWeb now provided outsourcing services! Price?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.