Here's what I have gotten so far, but I am new to C++ and really do not understand functions. Am I even going in the right direction? What do I do from here? |
The first thing you need to do is to get organized.
Program Requirements:
The program must read employee name.
The program must show salary.
The program must show taxes.
The program must must be calculated based on income:
A. 0% for salaries under $1000.
B. 10% for salaries $1000-$2000.
C. 15% for salaries above $2000.
The program must show Net pay (or salary after taxes) (Gross is before taxes)
The program must write output to an output file.
The program must display it in a summary table.
The program must use functions.
Alright. That's better. Each line I've just written can be written as a function, so we've already got the last requirement licked. Now go right down the list. Write a program that inputs your data, and can display Name and Salary. There are a few ways to do this. You can read a text file into a class, into an array, a vector... That's your choice.
Once you have that done, display them. Then the fun part. Move that routine out of main, and you'll have your first function. When you get that working, move right on down the list...