CST8102 – CST8132 Assignment 02: Employee Management Tool Prototype (Solution)

$ 24.99
Category:

Description

Problem Description

• Assign2 contains only a main method, which instantiates one Company reference and calls menu().
• Company has a private static int constant which is used to represent the maximum amount of employees, a private static int which is used to keep track of the current amount of employees, an array for Employee references (10 references), one constructor and five methods:
 menu() – shows the menu, interacts with the user for menu selection, loops till they exit.
 addEmployee().
 verifies that the maximum number of Employees is not already hired by the company.  Prompts for the employee’s name.
 Presents a second level of choices for the user to choose the type of Employee to add (Executive, SalesRep or Programmer).
 Keeps track of the current total amount of employees.
 printEmployeeList()- displays information for the current employees.
 calculatePayroll() – invokes the calculatePay() method for each employee and keeps a running total of the total company pay.
 findLongestEmployedEmployee() –determines who is currently the longest employed employee based on the results returned from the calculateDays() method in the OurDate class.
 calculatePay() – an abstract method with concrete implementations in each of the subclasses.
• Executive extends Employee. It has a salary field and three constructors, a “getter” and a “setter” for salary, and overridden methods for both calculatePay() and toString().
• SalesRep extends Employee. It has salesAmount and commissionRate fields and three constructors, a “getter” and a “setter” for each field, and overridden methods for both calculatePay() and toString().
• Programmer extends Employee. It has hoursWorked and rateOfPay fields and three constructors, a
“getter” and a “setter” for each field, and overridden methods for both calculatePay() and toString().
• OurDate
 Reuse OurDate from assignment #1

Notes:
• NOTE 1: Only Company interacts with the user; no other classes should use Scanner or println (etc.).
• NOTE 2: Do not use recursion for your method calls – instead use a properly coded repetition structure. You will lose marks if recursion is used
• NOTE 3: Do not use any kind of “go-to” statement such as continue, break, System.exit(0), etc… in order to implement program logic. Instead, use a properly coded control structure and test for continuity or true/false conditions with a boolean expression. You will lose marks if any “go-to” statements are used. Appropriate places for “break” statements include using them in a “switch” selection structure.

Testing Design

The scope of testing required will be limited to only those specified in the UML below. There should only be one assert statement per test case. Each unit test should have an appropriate message if a test fails.

Reference: http://www.cra-arc.gc.ca/tx/ndvdls/fq/txrts-eng.html and http://www.cra-arc.gc.ca/tx/ndvdls/tpcs/ncm-tx/rtrn/cmpltng/ddctns/lns300350/323/dctn-eng.html.

Build the program, do not overlook the package name used for the program classes. Build the JUnit test classes, use a separate package as indicated in the UML.

Submission Requirements
• Your lab professor will indicate any additional submission requirements to you in the lab

Comments Note
• At the top of each source code file include the following comment header, adding the needed information: /* File Name:
* Course Name:
* Lab Section:
* Student Name:
• Classes and class members (class level fields, constructors, methods) should have a brief description as a comment immediately above in the code listing. Example: /*
* Represents a Company to enable the
*implementation of human resource functionality
*/
public class Company{

Grading Rubric
Criteria
Needs Work (0) Poor (1) Intermediate (2) Excellent (3) Value Scored
Naming Classes and class members follow no Java naming conventions. Java naming conventions are not well followed. Classes and class members follow Java naming conventions
with tiny inconsistencies. All classes, class
members are named following Java naming conventions, consistently and perfectly.
Comments
(Javadoc not
required Assign 2)
Comments missing or incorrect. Many classes and / or class members missing meaningful comments Very few classes and / or members missing comments, comments are meaningful. Nearly everything is commented, comments
are meaningful, brief, well written.
e.g. only the URL provided. References and
citations loosely follow APA style References and
citations closely follow APA style
Compiles Program does not compile, too many syntax mistakes for the professor to track or debug without major rewrite. Program does not compile, has several syntax mistakes Program does not compile, has a few small syntax mistakes Program compiles
Execution Program is missing much functionality. For example program starts to run but does not work correctly. Program is missing much code, and much of the required concepts. Program demonstrates most of the concepts, some parts left out. Program demonstrates understanding and application of concepts notably manipulation of a 1 dimensional array, and composition.
Concepts:
Inheritance, polymorphism, abstract classes/methods. Concepts are not demonstrated, program does not follow UML design. One or two concepts demonstrated, program loosely follows UML design Program demonstrates most of the concepts, closely follows UML design Program demonstrates understanding and application of concepts notably inheritance, polymorphism, abstract and follows UML design exactly.
Unit Tests Unit tests omitted or largely incomplete Unit tests work but code is not well organized (within each @Test method) Unit tests work and each @Test method has well organized code Unit tests work, each @Test method has well organized code, and meaningful variable names used to improve readability.
Sub-total Max(21):
Deductions for recursion or inappropriate use of “go-to” statements Max(-10):
Total:
Notes on citations and references
• Please do not cite or reference other students, ask for the original sources from them and cite and reference those instead
• You will not get credit for an assignment or project if large portions are copied directly from other sources, even if you cite and reference the source(s) correctly. Assignments are to be your own original work; other works can be used for help in solving problems or as small pieces of your larger program. Determinations on this are up to the discretion of the professor, if in doubt check with your professor.

Sample Program Run Screen Captures (green is user input):

Figure 2: New Executive

Figure 5: List Employees and Longest Employed Employee

Reviews

There are no reviews yet.

Be the first to review “CST8102 – CST8132 Assignment 02: Employee Management Tool Prototype (Solution)”

Your email address will not be published. Required fields are marked *