The Software Development Company now requests you build a C# program to collect
ID: 3756876 • Letter: T
Question
The Software Development Company now requests you build a C# program to collect information on software developers.
For this week's assignment, build on the Week One Individual Assignment, "Console Display Message," by allowing the user to enter one software developer's name, addresses, and monthly gross pay. The program should then display, on the console, the software developer's name, address, monthly gross pay, and taxes paid for that month. Taxes are set at 7% of the monthly gross pay.
Using Visual Studio® and C# programming concepts, write a program to meet the specifications of the company's request. The program should have the following characteristics:
Compile and Execute without errors
Meets specifications by displaying on the console a welcome message along with the following information:
Software developer name
Address
Gross monthly pay
Taxes
Logic flow is clear, concise, and effective
User inputs and outputs should be clear on screen
Appropriate indentation to logically illustrate program structure
Identifiers logically describe use
Naming conventions are consistent
Comments and headers to explain processing that is not obvious
Explanation / Answer
using System;
class Program
{
static void Main()
{
// Welcome banner
Console.Write(" ------------------------------------------------------------------------------------------------ ");
Console.Write("| *** Welcome to the Week One Individual Assignment *** | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
Console.Write("| *Note: Please fill-up the Software developers details as followed | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
Console.Write("Enter Software developer's name:");
string dev_name = Console.ReadLine();
Console.Write("Enter Software developer's address:");
string dev_addr = Console.ReadLine();
Console.Write("Enter Software developer's monthly gross pay:");
double dev_gross_pay = Convert.ToDouble(Console.ReadLine());
double tax_per_month = dev_gross_pay * 0.07;
Console.Write(" ------------------------------------------------------------------------------------------------ ");
Console.Write("| Software Developer Details | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
Console.Write("| Name | " + dev_name + " | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
Console.Write("| Address | " + dev_addr +" | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
Console.Write("| Monthly gross pay: | "+ dev_gross_pay + " | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
Console.Write("| Tax paid for this month | "+ tax_per_month + " | ");
Console.Write("------------------------------------------------------------------------------------------------ ");
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.