Thursday
April 24, 2014

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);

}
}
}

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

help - A group of five students needs to break into two smaller groups in order ...
probability - out of 250 students interviewed at a community college, 90 were ...
science - If you throw an egg against a wall, the egg will break. But if you ...
computer - What does tenure track, part time instructor of computer science does...
Algebra - I'm adding 2(radical 50) + 12 (radical 8). I began by breaking the ...
C++ - #include <iostream.h> #include <stdlib.h> int main ( ) { int ...
Computer Tech - Name 2 things that a computer virus might do if it gets into ...
computer - You are running two applications on your computer. You highlight some...
C++ - #include <iostream.h> #include <stdlib.h> int main ( ) { int ...
Science - How do I read this: "Robotic" World of Computer Science. Gale, 2002. ...

Search
Members