### c++ a program

can someone give me an idea of where to start from or what to do in this coursewor, don't get me wrong l am not saying do my work for me, l am only totally confused and lost.this is a c++ program.

The distance between two cities is 500 miles. Let us call these cities as CityA and CityB. Employees live in the CityA and travel to the CityB every day in the morning and come back in the evening on the same day except on Saturday and Sunday. They do not travel on vacations, holidays and sick days. Make following assumptions:
On January 1st, it is Monday.

It is not a leap year and the total number of days in the year is 365.

Each employee has 6 days of holidays in a year.

Each employee is entitled for different number of vacation in a year. The managers are entitled for 20 days of vacation every year and the workers are entitled for 15 days.

The managers and the workers both are also entitled for different number of sick days in a year. For mangers this is 8 and for the workers it is 17.

Write a program which accepts the employee type from the user and based on that calculates many miles the employee will travel in a year. Test it for different types of employees. The majority of the codes should be written in separate function(s). Limit the code in the main function. The main function should be mostly calling the other functions to meet the requirement of the project.
Though the managers and the workers are entitled for certain number of vacations and sick leave, they don't have to use all of those in a year. They may decide to use only part of these. You program should ask the user the followings:
1. Type of employee.
2. Number of vacation days used.
3. Number of sick days used.
You should write validations to make sure that the number of vacation days used, and the number of sick days used do not exceed the number of days the employee is entitled to.

pleas help me out
Last edited on
Break the problem up into smaller pieces (and where convenient use a function to calculate the value you are after).
Assume no-one works on weekends.
e.g How many Saturdays and Sundays are there in a 365 day year if the first Sat is day 6 and the first Sun is day 7. Use a loop to keep adding 7 to 6 and 7 and don`t exceed 365. Use count++ to keep track of how many
additions you have made. count should hold the number of Sats and Suns but make sure your logic is correct.
You now have the number of weekend days not worked which is common to A and B workers.
Now add A and B holidays.
Get A and B sick leave and again add to the above.
You now have the number of work days appropriate to A and B when you subtract each of the above from 365.
Multiply these two by 1000 to get miles for each.
Write some code to reflect the above, test it many times for errors and double check that it is producing the correct result. If you have problems post your code for help.
Topic archived. No new replies allowed.