

Test-Driving the Wage Calculator Application

Then, you will learn the additional C# technologies you will need to create your own version of this application. You begin by test-driving the completed application. Known as a control statement that allows us to make this distinction and perform different calculations based on different user inputs.

Introducing Algorithms, Pseudocode and Program Control In this tutorial, we introduce a programming tool The calculation differs if the employee has worked more than the standard 40-hour work week. If an employee has worked 40 or fewer hours, the employee is paid regular wages. This application calculates wages from hourly salary and hours worked per week. The total overtime earned is added to the user’s gross earnings for the regular 40 hours of work to calculate the total earnings for that week. Salary for time and a half is calculated by multiplying the employee’s hourly wage by 1.5 and multiplying the result of that calculation by the number of overtime hours worked.

Any time worked over 40 hours in a week is considered”overtime“and earns time and a half. The wages for 40 or fewer hours are calculated by multiplying the employee’s hourly salary by the number of hours worked. The application assumes a standard work week of 40 hours. Create an application that accepts this information and calculates the employee’s total (gross) earnings. Employees’ weekly salaries are based on the number of hours they work and their hourly wages. This application must meet the following requirements: Application Requirements A payroll company calculates the gross earnings per week of employees. The techniques presented are applicable to most high-level languages, including C#.ħ.1 Test-Driving the Wage Calculator Application In this section, we preview this tutorial’s Wage Calculator application. Structured programming is a technique for organizing program control to help you develop applications that are easier to debug and modify. In this tutorial, you will learn the theory and principles of structured programming. When writing an application, it is equally important to recognize the types of building blocks that are available and to use proven application-construction principles. This will allow you to carefully plan an approach to solving the problem. Introducing Algorithms, Pseudocode and Program Control efore writing an application, it is essential to have a thorough understanding of the problem you need to solve. ■ Use the if and if…else selection statements to choose among alternative actions. Objectives In this tutorial, you will learn to: ■ Understand basic problemsolving techniques. Outline Test-Driving the Wage Calculator Application 7.2 Algorithms 7.3 Pseudocode 7.4 Control Statements 7.5 if Selection Statement 7.6 if…else Selection Statement 7.7 Constructing the Wage Calculator Application 7.8 Assignment Operators 7.9 Formatting Text 7.10 Using the Debugger: The Watch Window 7.11 Wrap-Up 7.1
