Question

In: Computer Science

DO THIS IN C# (PSEUDOCODE)Social Security Payout. If you’re taking this course, chances are that you’re...

DO THIS IN C# (PSEUDOCODE)Social Security Payout. If you’re taking this course, chances are that you’re going to make a pretty good salary – especially 3 to 5 years after you graduate. When you look at your paycheck, one of the taxes you pay is called Social Security. In simplest terms, it’s a way to pay into a system and receive money back when you retire (and the longer you work and the higher your salary, the higher your monthly benefit). Interestingly, your employer will pay the same amount for you. The current tax rate is 6.2% until you make approximately $132,900. For this assignment, we’re going to help out hourly employees. Design (pseudocode) and implement (source code) a program that asks users how much they make per hour, the number of hours they work per week, and calculates the yearly income. For the second half, the program should calculate and display the amount of Social Security tax the user will pay for that year. You must write and use at least two functions in addition to the main function. At least one function must not have a void return type. Note, don’t forget to put the keywords “public” and “static” in front of your functions. Document your code and properly label the input prompt and the outputs as shown below.

Sample run 1: Enter hourly wage: 10 Enter your hours per week: 40 You will earn $20800.0 per year You will pay $1591.2 in Social Security tax Sample run 2: Enter hourly wage: 40 Enter your hours per week: 60 You will earn $124800.0 per year You will pay $9547.2 in Social Security tax

Solutions

Expert Solution

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Here a new Console Application in C# is created using Visual Studio 2017 with name "SocialSecurityPayout".This application contains a class with name "Program.cs".Below are the details.

Program.cs :

//namespace
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//application namespace
namespace SocialSecurityPayout
{
class Program //C# class
{
//declaring variable to store tax
public static double tax = 0;
//main method
static void Main(string[] args)
{
//asking user hourly wage
Console.Write("Enter hourly wage : ");
int wage = int.Parse(Console.ReadLine());//reading wage
//asking user hours per week
Console.Write("Enter your hours per week : ");
int hoursPerWeek = int.Parse(Console.ReadLine());//reading hours per week
//calling method to compute per year income
int earning = calculatePayforYear(wage, hoursPerWeek);
//calling method to calculate tax
calculateTax(earning);
//print details that is earning
Console.WriteLine("You will earn $"+earning.ToString("0.0")+" per year");
//print tax
Console.WriteLine("You will pay $"+ tax.ToString("0.00")+ " in Social Security tax ");
//to hold the screen
Console.ReadKey();
}

//method to get inputs from user
public static int calculatePayforYear(int wage, int hours)
{
//return earing for the year
return wage * (hours * 52);

}
//method to calculate Enter your hours per week:
public static void calculateTax(int earning)
{
tax = (double)earning * (6.2/100);//return tax
}
}

}

======================================================

Output : Run application using F5 and will get the screen as shown below

Screen 1 :

Screen 2:

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.


Related Solutions

IN PSEUDOCODE AND C++!! Program 1: Social Security Payout. If you’re taking this course, chances are...
IN PSEUDOCODE AND C++!! Program 1: Social Security Payout. If you’re taking this course, chances are that you’re going to make a pretty good salary – especially 3 to 5 years after you graduate. When you look at your paycheck, one of the taxes you pay is called Social Security. In simplest terms, it’s a way to pay into a system and receive money back when you retire (and the longer you work and the higher your salary, the higher...
Explain life chances. How do life chances differ based on social class?
Explain life chances. How do life chances differ based on social class?
This is an introduction to social science research methods course: Imagine you’re planning to estimate the...
This is an introduction to social science research methods course: Imagine you’re planning to estimate the price of the average book at your college bookstore. The bookstore carries 13,000 titles, but you plan to sample only 200 books. You will select a sample of 200 books, record the price of each book, and use the average of the 200 books to estimate the average price of the 13,000 titles in the bookstore. Assume that the bookstore can give you access...
a. The Social Security system is predicted to be on a course to exhaust its trust...
a. The Social Security system is predicted to be on a course to exhaust its trust fund. What is the primary cause of this? (And don’t say that revenues are less than expenses. Explain why this is the case. b. Cite at least two potential solutions from class or the text to the problem of social security running out of funds and the difficulties of implementing each of these solutions
What are the pros and cons of taking Social Security retirement benefits at age 62, at...
What are the pros and cons of taking Social Security retirement benefits at age 62, at normal retirement age, and at age 70. Consider the cash flow and tax implications of each option.
This is an Introduction to Homeland Security course question. In a Homeland Security context, do you...
This is an Introduction to Homeland Security course question. In a Homeland Security context, do you believe that the term “prevention,” differs in meaning from the terms “mitigation” or “preparedness?” What types of prevention activities can be conducted in advance of a terrorist attack?
how do we treat retirement and social security problem? A government report concluded that Social Security...
how do we treat retirement and social security problem? A government report concluded that Social Security will be insolvent in 2035 and Medicare will be depleted by 2026. What do you think of the social security and retirement problem in the upcoming 20 years? What policy needs to be made? Should we take any actions or we should just wait?
C# Write a program in C# that prompts the user for a name, Social Security number,...
C# Write a program in C# that prompts the user for a name, Social Security number, hourly pay rate, and number of hours worked. In an attractive format, dis- play all the input data as well as the following: » Gross pay, defined as hourly pay rate times hours worked » Federal withholding tax, defined as 15% of the gross pay » State withholding tax, defined as 5% of the gross pay » Net pay, defined as gross pay minus...
Do social security benefits change, and if so what is the basis.
Do social security benefits change, and if so what is the basis.
With the social uprising that is currently taking place in our country, do you think a...
With the social uprising that is currently taking place in our country, do you think a film like Rush Hour helps the call to increase the number of Asian characters found in Hollywood films, or do you think an Asian character such as Detective Lee supports the usual Asian stereotypes often found in Hollywood films. Neither? Both? Make sure you use a specific example from the film to support your answer.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT