Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Clearly Visual Basic: Programming with Microsoft Visual Basic 2012, Chapter 8, #

ID: 3604261 • Letter: C

Question

Clearly Visual Basic: Programming with Microsoft Visual Basic 2012, Chapter 8, #12 Please Answer and Provide Actual SCREENSHOT of Visual Basic CODE and Application being used for reference such that beginner may re-attempt. FICA Tax Calculator When you either work for an employer or are self-employed, you must pay payroll taxes that fund Social Security and Medicare. These taxes are called FICA taxes because they are collected under the authority of the Federal Insurance Contributions Act. The 2013 rate is 7.65% of your gross earnings for the year. The 7.65% includes a 6.2% contribution to the Old-Age, Survivors, and Disability Insurance (OASDI) program and a 1.45% contribution to Medicare's Hospital Insurance (HI) program. The 6.2% contribution is on the first $113,700 of earnings for the year; there is no earnings limit for the 1.45%. Create an application that calculates and displays the FICA tax to deduct from the current pay period's check. Use the following names for the solution and project, respectively: FICA Solution and FICA Project. Save the application in the VbReloaded20121Chap04 folder. Change the form file's name to Main Form.vb. The interface should allow the user to enter two values: the user's current year-to-date earnings (which do not include the current pay period) and the earnings for the current pay period. You can either create your own user interface or create the one shown in Figure 4-46. The image in the picture box is stored in the VbReloaded20121 Chap041FICA.png file. (1-4) FICA tax FICA Tax Calculator Year-to-date earnings Current earnings Cajculate Current FICA tac Exit Figure 4-46 Sample interface for the FICA Tax Calculator application

Explanation / Answer

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
const double FEDERAL_TAX_RATE= 0.28;
const double SOCIAL_SECURITY_RATE = 0.0765; // I am assuming the 7.65 was supposed to be 7.65%... therefore it should be 0.0765

Console.WriteLine(" WEEKLY PAYROLL INFORMATION");
Console.WriteLine(" --------------------------");
Console.Write(" Please enter the employer's name: ");
string empName = Console.ReadLine();
Console.Write(" Please enter the number of hours worked this week: ");
double hrsWorked = Convert.ToDouble(Console.ReadLine());
Console.Write(" Please enter the number of OVERTIME HOURS worked this week: ");
double ovtWorked = Convert.ToInt32(Console.ReadLine());
Console.Write(" Please enter employee's HOURLY PAY RATE: ");
double payRate = Convert.ToDouble(Console.ReadLine());
double grossPay = CalculateGrossPay(hrsWorked, payRate, ovtWorked);
double federalTaxWithheld = CalculateTax(grossPay, FEDERAL_TAX_RATE);
double socialSecurityWithheld = CalculateTax(grossPay, SOCIAL_SECURITY_RATE);
double netPay = CalculateNetPay(grossPay, federalTaxWithheld + socialSecurityWithheld);

Console.WriteLine(" The weekly payroll information summary for: " + empName);
Console.WriteLine(" Gross pay: {0:C2} ", grossPay);
Console.WriteLine(" Federal income taxes witheld: {0:C2} ", federalTaxWithheld);
Console.WriteLine(" Social Security taxes witheld: {0:C2} ", socialSecurityWithheld);
Console.WriteLine(" Net Pay: {0:C2}", netPay);

Console.ReadLine(); // You don't need this line if your running from the command line to begin with
}

static double CalculateGrossPay(double HoursWorked, double PayRate, double OvertimeHoursWorked)
{
return PayRate * (HoursWorked + 1.5 * OvertimeHoursWorked);
}

static double CalculateTax(double GrossPay, double TaxRate)
{
return GrossPay * TaxRate;
}

static double CalculateNetPay(double GrossPay, double TaxAmount)
{
return GrossPay - TaxAmount;
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote