Write an application that inputs one number consisting of FIVE digits from the user, separates the number into its individual digits and prints the digit separated from one another by three spaces each. For example, if the user types in the number 42339, the program should print “4 2 3 3 9”. Assume that the use enters correct number of units.
You are required to develop a C# application Named PayCalculator.cs that will determine the gross pay for each of three employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40 hours. You are given a list of the three employees of the company, the number of hours each employee worked last week and the hourly rate of each employee. Your application should input this information for each employee and should determine and display the employee’s gross pay. Use the Console class’s ReadLine method to input the data.
a) Formulate the algorithm using pseudocode and top-down, stepwise refinement. Write down the top step, first step and second step of pseudocode.
b) Write a C# application. Include the C# program code in your assignment submission.
c) Test, debug and execute the C# application with 3 sets of employee data as given below to verify if your program calculates the pay correctly for each employee. Include the output in your assignment submission.
You should submit the source codes and a report. Source codes should be names as mentioned above.
? Following source codes you should publish.
• Problem 1 – Five.cs
• Problem 2 - PayCalculator.cs
? The report should contain following headings for each problem.
• Introduction for both the programs
• Flowcharts to depict each application logic
• The test cases
• Screenshots for sample inputs, outputs and errors.
How to Submit
Submit via Moodle using the link provided on or before the deadline. You should submit the assignment on or before 10th January 2018.
The program is designed to take input of a 5 digit number and then print the individual digits of the number with a gap of 3 spaces. Flow Chart
Output: 6 5 4 5 8
Pay Calculator Introduction
The Pay Calculator class is designed to calculate the gross pay of 3 employees depending on their hourly pay rate and hours worked. On working for more than 40 hours, the extra pay is half the hourly rate per hour.
Test Reason: To check if the program outputs proper messages on erroneous inputs of string in place of numbers.
Hourly Rate: pop
Expected Output: Appropriate Error-Message
Actual output: “Enter Numbers Only”
Test Reason: To check if the program outputs proper results when the hours entered is more than the boundary mark of 40 hrs.
Hourly Rate: 15.6
Expected Output: 1092
Actual output: $1092
Test Reason: To check if the program outputs proper results when the hours entered is less than the boundary mark of 40 hrs.
Hourly Rate: 18
Expected Output: 630
Actual output: $630
Test Reason: To check if the program outputs proper results in the boundary hour mark of 40 hours.
Hourly Rate: 15
Expected Output: 600
Actual output: $600
The Random Number Generator program is used to generate 50 random numbers within the range 0-9 and then the frequency or histogram of each of these numbers are generated depending one user’s choice.
Cite This Work
To export a reference to this article please select a referencing stye below:
0 | Pages :
One model that can identify my learning style is; The Kolb learning style model. It has four very diverse styles of learning and is based on two factors namely; how people understand the information - this could be either in a reflective or active way - and how they perceive the information as either being abstract or concrete (Mc Leod 2010). For the different learning styles, first are assimilators who the type of learn...
United Kingdom Haringey Management Personal Development for Employee University of London MBA
0 | Pages :
The quadratic equation is not only a part education in the high schools or colleges rather it is used in solving different complex problems in the scientific fields such as measuring the gravity, determining the speed of an object or a rocket along a projectile. The proposed application in this assignment we are working on developing a system or a software program that will calculate the roots ...
0 | Page :
Australia Footscray Management Business Economics University of Sydney MBA
0 | Pages :
Technology has become one of most effective and responsive friend of human. There are various significant areas and approaches that are helping the humans in doing research on their daily responses and activities. Psychology and neuroscience has played great role in establishing advancement in this domain of operations (Abbas, 2016). In contrast with these facts, the contemporary research going on based upon the facial expressions of h...
0 | Pages :
XYZ car packing service is a business venture focusing on providing a parking space for both the ordinary and seasonal customers. At full capacity, the business can hold a total of ten cars. To ease on their methods of operation and provide the best services in car parking business, XYZ has embraced specialization and division of labor. They have attained this by coming up with various departments to handle various tasks which en...