Question: NOTICE NEED IT IN C# Purpose This assignment will make use of conditionals. You will practice your understanding of Boolean operators and one and two-way

NOTICE NEED IT IN C#

Purpose

This assignment will make use of conditionals. You will practice your understanding of Boolean operators and one and two-way selection statements. It will also reinforce your understanding of object-oriented programming. While there is a lovely object-oriented way of writing the following solution with different Employee Classes that inherit from a parent Employee class, that is *not* what we are looking for in this instance so that we can emphasize using selection statements. We will code the logic all in one Employee object instead.

Note that this assignment should follow good naming standards for class names, instance variables, member variables, method names, and property names. Also, indentation should be appropriate and follow standards. Please truncate lines that are over 180 characters appropriately. This adherence to coding standards will help you to get in the habit of writing good code and ease your transition in more advanced programming classes and in the professional world.

Problem Statement

The planet of Mars is implementing a new planetary tax structure for its inhabitants. Mars has contracted you to implement a program that calculates take-home pay for employees.

Employees have either a weekly hourly wage or a monthly salary pay type.

Weekly hourly wage earners have the following deductions:

Mars planetary taxes are (specified in Martian pounds ):

If wages are >= 100.00 per hour 10%

If wages are >= 50.00 and

If wages are >= 50.00 and

If wages are

Mars planetary social security is 10%

Mars planetary air tax is 0.25 per hour.

Assume a 40 hour work week with no overtime.

Monthly salary earners have the following deductions:

Mars planetary taxes are (specified in Martian pounds ):

If last name is Brown - 0.00

If salary is >= 10,000.00 per month 22%

If salary is >= 5,000.00 and

If salary is

Mars planetary social security is 10%

Mars planetary air tax is 0.25 per 1,000.00 salary.

Implementation Details

You must implement this program using one Employee class for all employees. Please call your main class Assignment4 and class file Assignment4.cs. The Employee class should be called Employee.

The Main() method must ask the user to enter employee first and last name, pay type (monthly or weekly) and pay rate. It must then instantiate an Employee object and call a display method in the Assignment4 class. That display will write out the instance of the Employee object by calling ToString() implicitly, which should return a readable string of the form:

Employee John Brown is a weekly earner that makes 150.00 per hour.

Weekly take home salary after taxes is 4,790.00.

Employee Kim Wu is a monthly salary earner that makes 5,000.00 per month before taxes.

Monthly take home salary after deductions is 3,598.75.

private double totalTaxes;

private double takeHomePay;

private double planetaryTax;

private string firstName;

private string lastName;

private string type;

private double socialSecurityTax;

private double wageTax;

private double hoursWorked;

private double rate;

private double grossPay;

public const string HOURLY = "hourly";

public const string SALARY = "salary";

public const string BROWN = "brown";

public const double PLANETARY_AIR_TAX_RATE_HOURLY = .25;

public const double PLANETARY_AIR_TAX_RATE_MONTHLY = .00025;

public const double SOCIAL_SECURITY_TAX_RATE = .10;

NOTICE NEED IT IN C# Purpose This assignment will make use of

Assignment4 Employee +Maino - calls Setup Employee() assign the employee object returned to a local Employee object - calls Display passing the employee object -firstName - lastName - payType - payRate - takeHomePay + Constants for all of the defined amounts given in program specification + properties for all members + Employee SetupEmploye() - reads input for first name, last name, pay type (monthly or weekly), pay ratePrompts - instantiates Employee and either passes read in data here or calls mutators or setters - returns Employee +Display(Employee) - Writes output from employee to the console + constructor taking firstName, lastName, pay Type, payRate OR skip this and just use setters or properties to set up the employee. This should call the CalculateTakeHomePay method after setting up the member data. + Calculate TakeHomePay() - Taking into account the payType, it should calculate the deductions appropriately, calculate takeHomePay and save it. + ToString()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!