For each question explain (100-150 words) how the logic works 1. An Employee file contains the employee number, employee
Posted: Sat Nov 27, 2021 2:28 pm
For each question explain (100-150 words) how the logic
works
1. An Employee file contains the employee number, employee name,
department number and their salary. The department number contains
value 10, 20 and 30. Increment for the employee will be calculated
depends on their department number. If the department number is 10,
20 and 30 salary increment will be 40%, 60% and 80% respectively.
Construct an algorithm that will read a record on the file,
calculate the salary increment for that record, and print the
employee number, employee name, department number and new salary
after increment.
2. A member records contains member name, gender (M or F), age
(in years) and marital status (single or married) for each member.
Design an algorithm that will read through the file and calculate
the numbers of married men, single men, married women and single
women. Print these numbers on member summary report. If any single
men are over 30 years of age, print their names and ages on a
separate eligible bachelors report.
3. Design an algorithm that will prompt for and receive the time
expressed in 2400 format (e.g. 2305 hours), convert it to 12-hour
format (e.g. 11.05 pm) and display the new time to the screen. Your
program is to repeat the processing until a sentinel time of 9999
is entered.
works
1. An Employee file contains the employee number, employee name,
department number and their salary. The department number contains
value 10, 20 and 30. Increment for the employee will be calculated
depends on their department number. If the department number is 10,
20 and 30 salary increment will be 40%, 60% and 80% respectively.
Construct an algorithm that will read a record on the file,
calculate the salary increment for that record, and print the
employee number, employee name, department number and new salary
after increment.
2. A member records contains member name, gender (M or F), age
(in years) and marital status (single or married) for each member.
Design an algorithm that will read through the file and calculate
the numbers of married men, single men, married women and single
women. Print these numbers on member summary report. If any single
men are over 30 years of age, print their names and ages on a
separate eligible bachelors report.
3. Design an algorithm that will prompt for and receive the time
expressed in 2400 format (e.g. 2305 hours), convert it to 12-hour
format (e.g. 11.05 pm) and display the new time to the screen. Your
program is to repeat the processing until a sentinel time of 9999
is entered.