Essay CMIS 242 Project 1 Employee Salary

Essay CMIS 242 Project 1 Employee Salary

Essay CMIS 242 Project 1 Employee Salary
Essay CMIS 242 Project 1 Employee Salary

CMIS 242 Project 1 Employee Salary

The first programming project involves writing a program that computes the average salary for a collection of employees of different types. This program consists of four classes. The first class is the Employee class, which contains the employee’s name and monthly salary, which is specified in whole dollars. It should have three methods:

  1. A constructor that allows the name and monthly salary to be initialized.
  2. A method named annualSalary that returns the salary for a whole year.
  3. A toString method that returns a string containing the name and monthly salary, appropriately labeled.

The Employee class has two subclasses. The first is Salesman. It has an additional instance variable that contains the annual sales in whole dollars for that salesman. It should have the same three methods:

  1. A constructor that allows the name, monthly salary and annual sales to be initialized.
  2. An overridden method annualSalary that returns the salary for a whole year. The salary for a salesman consists of the base salary computed from the monthly salary plus a commission. The commission is computed as 2% of that salesman’s annual sales up to a maximum of $20,000.
  3. A toString method that returns a string containing the name and monthly salary, annual sales, appropriately labeled.

The second subclass is Executive. It has an additional instance variable that reflects the current stock price. It should have the same three methods:

  1. A constructor that allows the name, monthly salary and stock price to be initialized.
  2. An overridden method annualSalary that returns the salary for a whole year. The salary for an executive consists of the base salary computed from the monthly salary plus a bonus. The bonus is $30,000 if the current stock price is greater than $50 and nothing otherwise.
  3. A toString method that returns a string.

Finally there should be a fourth class than contains the main method. It should create an array of objects of type Employee and initialize them to a mixture of different kinds of employees. It should then compute and display the average salary for all employees.

Get Fast Writing Help – No Plagiarism Guarantee!

Fastwritingservice.com is one of the best Online assignment writing websites that provide students with quality academic term papers, admission essays, annotated bibliographies, reports, essays, personal statements, research proposals, research papers, projects, presentations, movie and book reviews, application papers, among others.

Top-Rated Essay Writing Service | Flawless papers for All Your classes!

PLACE YOUR ORDER