Homework 3 (C# Object Oriented Programming)
Ø Make a Windows App that manages
Employee data. The App should be based on (OOP) “Demo 01 Employees”, and is
demonstrated without source by Homework3.exe
Ø
(35)
The App must show encapsulation and inheritance use
§
Visually inherit
from a base form in an external assembly that has a company logo “Employee Co.”
as a fixed label field.
§
Handle two new
kinds of Employees, a Consultant and a Human Resource person. Make appropriate
fields, properties, ctor’s, and methods.
§
HR person has int contacts property, and gets bonus of (contacts*amount)
§
Consultant has
float overtime property, and gets bonus of (overtime*amount)
Ø
(50) The App must show use of polymorphism
§
The App should
add new employees of the various kind into an internal
Employee Array, and initialize data, for any of the various kinds of employee.
Various screen entries can accomplish this, as given in Homework3.exe.
§
The App must
have functionality that will clear all employees of any type
§
The App
must be able to display the “stats” or
employee info of any selected employee
§
Compute a weekly
payroll list with names and amounts, and print it to a file pay.txt.
§
A payroll total
should be displayed on the GUI.
Ø
(15)
The App must be able to distinguish derived class members by type
§
The payroll is
computed by issuing bonus amounts (below), and then adding currPay’s
into a total:
§
Manager- 1000.00
§
Sales- 100.00
§
PT Sales- 50.00
§
HR- 10.00
§
Consultant-100.00
§
EXTRA
CREDIT: (5) Save the current employee data to a file emps.dat
§
EXTRA
CREDIT: (5) Recover the saved employees
NOTE BENE: Future assignments will build on the current
Employee App
§
The
Employees class will be improved to
§
Work
will the “foreach” iterator
in a collection
§
Have
name, ID, and other indexers; and a “+” operator
§
Be
written and recovered to a file
§
Be
written and recovered to an ADO.NET database
§
Have
much more appropriate GUI elements
§
Much
more