The following are frameworks to guide your design efforts in developing usable applications. The nuts and bolts of the design, and the actual working of the application is left to your imagination.
| 1. | Develop a class Calculator that represents a basic arithmetic calculator. It should allow users to add, subtract, multiply and divide numbers and display the results. Using inheritance, develop a subclass ScientificCalculator that will perform additional scientific operations such as computing square roots, exponentiation, natural logarithms, and any other additional operations you consider relevant. |
| 2. | Develop a payroll application with the following classes:
Abstract class Employee. This class serves as a parent class for various
employee types. Relevant attributes may be Name, Address, ID etc. Relevant
methods may be Display() will display Name, and ID, ComputePay() this must be
a pure virtual method. Add any other method you consider relevant.
Subclass LineEmployee. This class represents line workers. Line workers are
paid hourly wages at the rate of $25.00. If a line worker works more than 40
hours in a week, he/she is entitled to overtime pay at 1.5 times the normal
wage rate. Redefine ComputePay() to reflect this rule and compute weekly
wages. Redefine Display() to display Name, ID and Wages.
Subclass StaffEmployee. This class represents staff workers. They are paid a
yearly salary based on their employee grade: Grade 1 $40,000 Grade 2 $50,000 Grade 3 $60,000 Redefine ComputePay() to reflect this rule and compute monthly salary. Redefine Display() to display Name, ID and monthly salary |