Friday
May 24, 2013

Homework Help: computer science

Posted by anon on Sunday, July 1, 2012 at 5:31pm.

Can you help me break this into two clases, and Employee class and the default program class? I have to include a mutator and accessor method and provide properties for the instance variables.



namespace commission
{
class Program
{


static void Main(string[] args)
{

decimal commission = 0.07M;
decimal federaltax = 0.18M;
decimal retirement = 0.10M;
decimal socialsecurity = 0.06M;

decimal commission_amt = 0;
decimal fed_t_amt = 0;
decimal retire_amt = 0;
decimal ss_amt = 0;
decimal total_amt = 0;
decimal moneytakenout_amt = 0;
decimal takehomepay = 0;
string employeeName;


Console.Write("Enter employee name: ");
employeeName = Console.ReadLine();

Console.Write("Enter the total sales amount for the week: ");
total_amt = Convert.ToDecimal(Console.ReadLine());

commission_amt = total_amt * commission;
fed_t_amt = federaltax * total_amt;
retire_amt = retirement * total_amt;
ss_amt = socialsecurity * total_amt;

moneytakenout_amt = retire_amt + fed_t_amt + ss_amt;
takehomepay = total_amt - moneytakenout_amt;

Console.WriteLine(commission_amt);
Console.WriteLine(fed_t_amt);
Console.WriteLine(retire_amt);
Console.WriteLine(ss_amt);
Console.WriteLine(takehomepay);

}
}
}

No one has answered this question yet.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Programming II - Create a test program that defines and uses both the default ...
computer science - I need to see if someone can hepl me with a c# programming ...
math - •You and three (3) of your friends were in the same ...
java - I hava a Employee class and my main class. But in my netbeans it is ...
HSM/270 - Last few weeks of class and struggling to keep up to graduate, can ...
Computer Science - I got part one but part 2 is confusing. Part1: Create a class...
hcc - I need help designing a program for a sales tax on a package of items that...
computers - I have just started a basic class in programming and I am totally ...
computer science - Hi, I have this quick question: A Java interface can be used ...
strayer - You and three (3) of your friends were in the same advance placement ...

For Further Reading

Search
Members
Community