Assignment 1213123
Assignment 1213123
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.
Copyright Disclaimer:
The materials provided in class and in SLATE are protected by copyright. They are intended for
the personal, educational uses of students in this course and should not be shared externally
or on websites such as Chegg, Course Hero or OneClass. Unauthorized distribution may result
in copyright infringement and violation of Sheridan policies.
Gursharan Singh Tatla (Winter 2022)
Instructions:
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
Page 1 of 5
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.
Gursharan Singh Tatla (Winter 2022)
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.
Gursharan Singh Tatla (Winter 2022)
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.
Page 2 of 5
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.
Page 3 of 5
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
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.
Gursharan Singh Tatla (Winter 2022)
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.
Page 4 of 5
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.
4. You do not have to format this code - it's used by TurnItIn (the originality checker in SLATE,
which is a piece of software that checks your submission for plagiarism against other
submissions in the college, in other colleges, from the web, and various other sources).
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.
b. This is used for TurnItIn (it won't examine the contents of zip/rar files).
Gursharan Singh Tatla (Winter 2022)
Reference:
• I’ve used NuGet package ConsoleTables to print the output in the tabular form.
• Link: https://github.com/khalidabuhakmeh/ConsoleTables
Sample Output:
• Check out this video to see the sample output of this application:
https://www.loom.com/share/dc0f4b0b292942628e058706c9c3f43e
Page 5 of 5