C++ is a programming language based on the earlier C programming language, with object oriented programming features which make snippets of code reusable. It is used to create desktop applications and programs--some of which may be popular programs that we use today. Since C++ easily integrates with other programming languages to create complex applications, it is widely used by developers. However, with C++ alone, you can create small useful applications such as accounting programs that calculate worker's salaries.
- Skill level:
Install an IDE (integrated development environment) that works well with C++ such as Visual Studio or NetBeans.
Develop the algorithm that will calculate worker salaries. Classify workers as salaried and hourly and proceed to map out the calculations needed to find the net amount of salary to be paid considering the gross salary based on salary grade, amount of time worked (for hourly workers) deductions such as taxes, social security and medical benefits.
Determine the information that is needed for input to calculate the salary. Using the IDE, design an input page based on this information.
Translate your salary computation algorithm into C++ code. Create C++ functions for specific calculations such as one for taxes and another function for calculation for benefits and so on. Incorporate this with your input screen using C++ scripts to grab data from your input forms and store them in variables to be used for the calculations. Set up scripts to invoke actions when buttons on your input screen are pressed.
Design the output screens for your application using the IDE and add the C++ code that displays the data.
Test your application and add error handling code to catch any errors encountered in the program.
Save the project. Compile it to create an executable file that can be distributed to end users.
Tips and warnings
- When designing a worker salary calculator application, it is advisable to conduct interviews with the end users of the application, as well as the company accountants, to ensure that your application works as expected and accurately reflects the salary amount given to employees.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for