Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Please check the attached PDF. The code has to be unique

Please check the attached PDF. The code has to be unique (built from

scratch). At least 10 names for the employees, executives, and salesman in total.

1CMIS 242 – Project 11. SpecificationThe first programming project involves writing a program that computes the salaries for a collection of employeesof different types. This program consists of four classes.1. The first class isEmployee, which contains the employee’s name and monthly salary which is specified in wholedollars. It should have three methods:a.A constructor that allows the name and monthly salary to be initialized.b.A method namedannualSalarythat returns the salary for a whole year.c.AtoStringmethod that returns a string containing the name and monthly salary, appropriately labeled.TheEmployeeclass has two subclasses:SalesmanandExecutive.2. TheSalesmanclass has an additional instance variable that contains the number of sold items. It should havethe same three methods:a.A constructor that allows the name, monthly salary and number of sold items to be initialized.b.An overridden methodannualSalarythat returns the salary for a whole year. The salary for a salesmanconsists of the base salary computed from the monthly salary plus a commission. The commission is zeroif the number of sold items is less than 200, equal to one month salary if the number of sold items isbetween 200 and 300 and equal to two month salary if the number of sold items is 300 or more.c.An overriddentoStringmethod that returns a string containing the name, monthly salary and number ofsold items, appropriately labeled.3. TheExecutiveclass has an additional instance variable that reflects the current stock price. It should have thesame three methods:a.A constructor that allows the name, monthly salary and stock price to be initialized.b.An overridden methodannualSalarythat returns the salary for a whole year. The salary for an executiveconsists of the base salary computed from the monthly salary plus a bonus. The bonus is $20,000 if thecurrent stock price is greater than $100 and nothing otherwise.c.An overriddentoStringmethod that returns a string containing the name, monthly salary and stock price,appropriately labeled.4. Finally there should be a fourth classP1Driverthat contains themainmethod. It should read in employeeinformation from a text fileinputData.txt. The file will contain employee information for only two years: 2015 and2016. Each line of the text file will represent the information for one employee for one year. An example of howthe text file will look is shown below:2015 Employee Smithson,John 20002016 Salesman Jokey,Will 3000 2362015 Executive Obama,Barack 5000 150The year is the first data element on the line. Next is the type of the employee followed by the employee nameand the monthly salary. For salesmen, the final value is the number of sold items and for executives the stockprice. As the employees are read in,Employeeobjects of the appropriate type should be created and stored in anarray depending upon the year. There should be two arrays, one corresponding to 2015 and one corresponding toyear 2016. You may assume that the file will contain no more than 200 employee records for each year and that
Background image of page 1
2the data in the file will be formatted correctly.Once all the employee data is read in, a report should be displayed on the console for each of the two years.Each line of the report should contain all original data supplied for each employee together with that employee’sannual salary for the year. The last line of the report should display the total number of employees and theaverage of all salaries for that year.Your program should compile without errors.The Google recommended Java style guide (https://google.github.io/styleguide/javaguide.html), should be usedto format and document your code. Specifically, the following style guide attributes should be addressed:Header comments include filename, author, date and brief purpose of the program.In-line comments used to describe major functionality of the code.Meaningful variable names and prompts applied.Class names are written in UpperCamelCase.Variable names are written in lowerCamelCase.Constant names are in written in All Capitals.Braces use K&R style.In addition the following design constraints should be followed:Declare all instance variables privateAvoid the duplication of codeTest cases should be supplied in the form of a table with columns indicating what aspect is tested, the inputvalues, expected output, actual output and if the test case passed or failed. This table should contain 5 columnswith appropriate labels and a row for each test case. Note that the actual output should be the actual results youreceive when running your program and applying the input for the test record. Be sure to select enough differentkinds of employees and situations to completely test the program.2. Submission RequirementsSubmit the following to the Project 1 assignment area no later than the due date listed in your LEO classroom.1. All.javasource files (no other file types should be submitted) and theinputData.txt file. The source codeshould use Java code conventions and appropriate code layout (white space management and indents) andcomments. All submitted files may be included in a .zip file.The input file will be generated by the students using a simple text editor such as Notepad.2. The solution description documentP1SolutionDescription(.pdf or .doc / .docx) containing the following:(1) Assumptions, main design decisions, error handling;(2) Test cases table(3) Screen captures showing successful program compilation and test cases execution. Each screen capture shouldbe properly labeled, clearly indicated what the screen capture represents.(4) Lessons learned from the project;
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"