Company XYZ needs a program to build a database concerning employee information.
ID: 3552741 • Letter: C
Question
Company XYZ needs a program to build a database concerning employee information. The program should do the following:Ask the employee for their name and number of dependents claimed for tax purposes.
Display a message to verify the number of tax deductions. (this will be one more than the number of dependents entered.)
Let employees select whether they want personal health insurance or family health insurance.
Display a message to verify the selection and tell each employee the cost of the selection.
Let employees select whether they want to deduct union dues from their paycheck.
Display a message to verify the selection and tell each employee the cost of the selection.
Show the OOD solution of this problem.
Step 1 Identify all nouns
Step 2 Identify class(es)
Step 3 Identify data members for each of the classes
Step 4 Identify operations for each of the objects (classes)
Company XYZ needs a program to build a database concerning employee information. The program should do the following:
Ask the employee for their name and number of dependents claimed for tax purposes.
Display a message to verify the number of tax deductions. (this will be one more than the number of dependents entered.)
Let employees select whether they want personal health insurance or family health insurance.
Display a message to verify the selection and tell each employee the cost of the selection.
Let employees select whether they want to deduct union dues from their paycheck.
Display a message to verify the selection and tell each employee the cost of the selection.
Show the OOD solution of this problem.
Step 1 Identify all nouns
Step 2 Identify class(es)
Step 3 Identify data members for each of the classes
Step 4 Identify operations for each of the objects (classes)
Explanation / Answer
Show the OOD solution of this problem.
Step 1 Identify all nouns
employee name
employee dependents(list)
bool health insurance // personal health insurance(0) or family health insurance (1)
health insurance cost
bool deduct union dues // deduct union dues or not
union dues cost
Step 2 Identify class(es)
employee information
Step 3 Identify data members for each of the classes
employee information:
employee name
employee dependents(list)
bool health insurance // personal health insurance(0) or family health insurance (1)
health insurance cost
bool deduct union dues // deduct union dues or not
union dues cost
Step 4 Identify operations for each of the objects (classes)
Ask EmployeeInfo
Display employee the cost of the selection for health insurance
Display employee the cost of the selection for union dues
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.