Question
Write a definition for a structure type for records consisting of a person's wage, accrued vacation (which is a whole number of days), and status
Write a definition for a structure type for records consisting of a person's wage, accrued vacation (which is a whole number of days), and status (which is hourly or salaried). Represent the status as one of the two char values 'H' and 'S'. Name your new data type EmployeeRecord. Write a main method that has several EmployeeRecord variables. Some should be initialized with values of your choice. For others, you should prompt the user for information to store. Once you have stored the information in a struct variable, for each salaried employee, calculate the total extra compensation they would receive if the company decides to reimburse them $200 per accrued vacation day and display this on the screen. Bonus: Create an array of 10 EmployeeRecord variables, filled with meaningful information. Use a loop to go through the array. Determine if each employee is salaried. If he is, calculate the total extra compensation he would receive if the company decides to reimburse him $200 per accrued vacation day and display this on the screen. In addition, calculate the total amount of money the company will have to pay out for such compensation to all salaried employees in the array.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started