Monday, September 21, 2015

C# Inputs and Outputs Formatting

Updated: Friday, September 25, 2015

My mini-payroll application has been revised to include the dollar symbol and decimals. After re-programming the code, this mini-payroll application is now capable of calculating in decimals and outputs the totals in a currency format. Some of the other changes I have made included the variables. I declared the CalculatePayroll(); variable a total of three times, so therefore the memory has been allocated (namespace is also CalculatePayroll), and once the method was coded, the function has the capability to repeat itself three separate times for the end user during the output process. I have also added a Console.Beep command to the code, which uses a random number generator to create different sounds to notify the user that the previous entry has been completed, and that a new entry was to follow. Lastly, I changed the colors around to make it easier on the eyes and added blue lines as a separator between employees. Below is the output generated from displaying the results of the calculations:




It's about 4AM in the morning and I just completed a working executable for assignment # 2.  Even though this assignment is not due for over a week or so, I managed to battle through it after spending countless hours reading, learning, and planning on how to execute this homework assignment in Visual Studio. The program that I just created was a mini-payroll application that multiplied the employee's hourly rate by the number of hours that the employee had worked, resulting in the employee's total pay. This program used the employee's name in the prompts for the hourly rate, number of hours worked, and the amount to be paid. Once I compiled the code for this program and got it to work, I called CalculatePayroll() three times and entered different values for the prompts. As you can see from below, I also coded different colors for each line.




No comments:

Post a Comment