Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: 1. Assignment must be completed as an individual effort. Do not collaborate with anyone or share it with any individual, party or entity. 2.

Note: 1. Assignment must be completed as an individual effort. Do not collaborate with anyone or share it with any individual, party or entity.

2. Due date for submission is specified in SLATE.

3. All online submissions will be done via SLATE (Email submissions will NOT be accepted).

4. Late assignments will be penalized 10% each day for up to 3 days. After that, it is worth 0.

5. Corrupt/incorrect submissions will be graded as zero.

6. Please refer to the Academic Integrity Policy.

7. Refer to the School of Applied Computing's Academic Procedures for Evaluations for more details regarding missed work: Procedures for Evaluations.

8. If you take code-snippets from somewhere such as StackOverflow, make sure to provide references to the webpages as comments wherever the code is used.

1. Make a .NET Console App using C# in Visual Studio and name it as A1YourFirstnameLastname.

2. Implement the wage calculator for employees which is capable of doing the following: Add, edit, and delete employees. View and search employees.

3. The application must be menu-based app: 1 - Add Employee 2 - Edit Employee 3 - Delete Employee 4 - View Employees 5 - Search Employee 6 - Exit

4. When selecting Add, Edit or Delete Employee option from the above menu, display a sub-menu which asks which type of employee is being added, edited, or deleted.

5. For example, if user selects 1 - Add Employee, then display the following sub-menu: 1 - Add Hourly Employee 2 - Add Commission Employee 3 - Add Salaried Employee 4 - Add Salary Plus Commission Employee 5 - Back to Main Menu

6. The menu should run continuously until the user quits the application. Validate the inputs. Any invalid input should not crash the app. Display user-friendly messages wherever necessary. Always display the employee info in a tabular form. Always display column headers when displaying employee info. Format the numeric values with appropriate symbols, such as currency amount with $ symbol, commission rate with % symbol.

7. NOTE: At no point should the application save any information to disk. All information is stored and managed in memory using a generic collection. The use of collections and the object-oriented design of the solution are an important part of the evaluation of your submission.

8. Add Employee: When adding a new employee, ask the user for all the required info and then save it to the collection. Then display a success message and print all the employees from that type of employee category in a tabular form to verify that the new employee is added. NOTE: When adding a new employee, do not ask for Employee ID, rather generate a new one. The Employee ID must be unique for every employee, just like a primary key in database.

9. Edit Employee: When editing an employee info, first display a list of all employees from the selected category. Then ask the user for the Employee ID of the employee that user wants to edit and fetch that employee from the collection. And ask the user for all the required info and then display a success message. Print all the employees from that category in a tabular form to verify that the employee is edited. NOTE: Do not ask the user to edit the Employee ID. It must be unique for every employee and must not be edited.

10. Delete Employee: When deleting an employee info, first display a list of all employees from the selected category. Then ask the user for the Employee ID of the employee that user wants to delete and fetch that employee from the collection. And remove the employee from the collection and then display a success message. Print all the employees from that category in a tabular form to verify that the employee is deleted.

11. View Employees: Display all the employees in a tabular form. Display column headers. Format currency and percentage amounts with appropriate symbols. Categorize the employees based on their employment type. o Check the sample output video to get an idea.

12. Search Employees: Ask the user to enter the employees name and display all the employees that match the search keyword. Partial match must fetch the results. Match should be case-insensitive, meaning if user enters lowercase john and the employees name is John (with uppercase J), it must fetch the employee.

13. The employees belong to four different categories: hourly, commission based, fixed weekly salary, and fixed weekly salary plus commission based.

14. Create an employee class Employee which must be declared as abstract.

15. Then derive three child classes from the Employee class: HourlyEmployee CommissionEmployee SalariedEmployee

16. Inherit the SalaryPlusCommissionEmployee from the CommissionEmployee class.

17. Use enum to represent different types of employees. If you ever need to find what type of employee it is, do not compare it with string, rather make use of enum. Do: if (employeeType == EmployeeType.HourlyEmployee) Where, EmployeeType is declared as an enum. Dont: if (employeeType == "HourlyEmployee")

18. The parent class Employee has fields which are common to all employees, such as: EmployeeType, EmployeeId, EmployeeName

19. The parent class Employee also declares an abstract property GrossEarnings, which will be overridden in the derived classes. GrossEarnings property must only have get accessor. It only returns the gross earnings. There is no point setting the value for this property.

20. A property Tax (with only get accessor), that calculates and returns the 20% tax.

21. A property NetEarnings (with only get accessor), that returns the net earnings after tax deductions.

22. Class HourlyEmployee inherits from Employee: This class stores hours worked and hourly wage. Implements the GrossEarnings property that returns the earnings of this employee, considering any overtime at the rate of 1.5. Gross Earnings: if hours <= 40 then wage * hours if hours > 40 then 40 * wage + (hours - 40) * wage * 1.5

23. Class CommissionEmployee inherits from Employee: This class stores the gross sales and commission rate. Implements the GrossEarnings property that returns the earnings of this employee. Gross Earnings = gross sales * commission rate

24. Class SalariedEmployee inherits from Employee: This class stores the fixed weekly salary. Implements the GrossEarnings property that returns the earnings of this employee. Gross Earnings = fixed weekly salary

25. Class SalaryPlusCommissionEmployee inherits from CommissionEmployee: This class stores the fixed weekly salary. Implements the GrossEarnings property that returns the earnings of this employee. Gross Earnings = weekly salary + gross sales * commission rate

26. Use your Java and object-oriented programming knowledge to create this hierarchy. NOTE: Use C# properties to get/set the fields. Do not use getter/setter methods like you would do in Java. You will get higher grades if: i. Proper use of inheritance. ii. User-Interface is user-friendly. iii. App menu runs smoothly without crashing. Otherwise, there will be grade deductions.

27. In the Program.cs file, create and maintain a generic collection of all employees. The generic collection must be of type parent class Employee and it must store objects of derived classes. Populate this collection with some sample data when the program runs.

Marks Breakdown:

10% for correct submission.

10% for console menu system.

10% for user-friendly and tabular outputs.

30% for classes and inheritance.

20% for implementing all the operations.

20% for overall working of the application.

Submission:

1. Once done, ZIP the entire project folder and upload it to Assignments on SLATE. a. Double-check your submission by downloading it and running it.

2. You are to submit .ZIP and .TXT files, separately: a. Upload the .ZIP file of your assignment to SLATE. b. Upload the .TXT files to SLATE.

3. You must copy and paste all of your source code from your C# files into plain text files. a. You can copy and paste the source code into Notepad. b. Create a separate .TXT file for each source code file.

5. Submit this document in addition to your assignment ZIP file.

a. DO NOT add it inside your zip/rar file - it must be a separate file.

Sample Output:

Check out this video to see the sample output of this application: https://www.loom.com/share/dc0f4b0b292942628e058706c9c3f43e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started