Write a definition for a structure type for personnel records for hourly employees. The record contains an hourly wage rate, accrued vacation in an integer number of days, and employee status (use ‘T’ for temporary and ‘P’ for permanent). Part of the problem is appropriate choices of type and member names.

What will be an ideal response?


```
struct HourlyEmployee
{
double wageRate;
int accruedVacation;
char status; // ‘P’ for permanent, ‘T’ for temporary
};
```

The name, HourlyEmployee reflects the fact that this is an employee record for an hourly employee. Member names should reflect the meaning of the member variable. Regarding the comment on the status line: the values for status are mnemonic, nevertheless, it may be better not to depend on memory too much.

Computer Science & Information Technology

You might also like to view...

____________ __________ are numbers that belong to a sequence, generated by a mathematical algorithm, in which each number is equally likely to occur.

Fill in the blank(s) with correct word

Computer Science & Information Technology

Windows Firewall ________

A) detects worms already on your computer B) blocks spam C) prevents you from opening e-mails with dangerous attachments D) blocks unwanted intrusions

Computer Science & Information Technology

In Query Design view, tables can be added to the ________ half

A) bottom B) right C) left D) top

Computer Science & Information Technology

A ____________ is a packet that has been encapsulated with the source and destination MAC addresses in the header and an error-checking code in the trailer.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology