How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Raj Your Own Question

Raj
Raj, Engineer
Category: Homework
Satisfied Customers: 1259
Experience:  4 + Experiance in IT Industry
16752232
Type Your Homework Question Here...
Raj is online now
A new question is answered every 9 seconds

Create a class named rates that has the following data members:

Resolved Question:

Create a class named rates that has the following data members:
Income limit; use read-only accessor.
Low tax rate; use read-only accessor.
High tax rate; use read-only accessor.
A class constructor that assigns default values of limit=30000, low rate = .15 and high rate = .28.
A class constructor that takes three parameters to assign input values for limit, low rate and high rate.
A CalculateTax method that takes an income parameter and computes the tax as follows:
If income is less than the limit then return the tax as income times low rate.
If income is greater than or equal to the limit then return the tax as income times high rate.
Create a class named Taxpayer that has the following data members:
Social Security number (use type string, no dashes between groups). Use get and set accessors.
Yearly gross income. Use get and set accessors.
Tax owed. Use read-only accessor.
The Taxpayer class should be set up so that its objects are comparable to each other based on tax owed.
The tax should be calculated whenever the income is set.
The Taxpayer class should have a getRates class method that has the following:
Local method data members for income limit, low rate and high rate.
Prompt the user to enter a selection for either default settings or user input of settings.
If the user selects default the default values you will instantiate a rates object using the default constructor and set the Taxpayer class data member for tax equal to the value returned from calling the rates object CalculateTax method.
If the user selects to enter the rates data then prompt the user to enter values for income limit, low rate and high rate, instantiate a rates object using the three-argument constructor passing those three entries as the constructor arguments and set the Taxpayer class data member for tax equal to the value returned from calling the rates object CalculateTax method.
In Main:
instantiate an array of five (5) Taxpayer objects.
Implement a for-loop that will prompt the user to enter the Social Security Number and gross income.
Implement a for-loop that will display each object as formatted taxpayer SSN, income and calculated tax.
Implement a for-loop that will sort the five objects in order by the amount of tax owed and then display each object as formatted taxpayer SSN, income and calculated tax.
Internal documentation.
Possible output for the program would look like this:

Enter Social Security Number for taxpayer 1 XXXXXXXXX
Enter gross income for taxpayer 1 35000
Do you want default values (enter D) or enter your own (enter O)? d
Enter Social Security Number for taxpayer 2 XXXXXXXXX
Enter gross income for taxpayer 2 80000
Do you want default values (enter D) or enter your own (enter O)? o
Enter the dollar limit 50000
Enter the low rate .15
Enter the high rate .25
Enter Social Security Number for taxpayer 3 XXXXXXXXX
Enter gross income for taxpayer 3 45000
Do you want default values (enter D) or enter your own (enter O)? d
Enter Social Security Number for taxpayer 4 XXXXXXXXX
Enter gross income for taxpayer 4 65000
Do you want default values (enter D) or enter your own (enter O)? o
Enter the dollar limit 70000
Enter the low rate .10
Enter the high rate .20
Enter Social Security Number for taxpayer 5 XXXXXXXXX
Enter gross income for taxpayer 5 70000
Do you want default values (enter D) or enter your own (enter O)? d
Taxpayer # XXXXX SSN: XXXXXXXXX income $35,000.00 Tax is $9,800.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $80,000.00 Tax is $20,000.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $45,000.00 Tax is $12,600.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $65,000.00 Tax is $6,500.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $70,000.00 Tax is $19,600.00

--------------------------------

Taxpayer # XXXXX SSN: XXXXXXXXX income $65,000.00 Tax is $6,500.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $35,000.00 Tax is $9,800.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $45,000.00 Tax is $12,600.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $70,000.00 Tax is $19,600.00
Taxpayer # XXXXX SSN: XXXXXXXXX income $80,000.00 Tax is $20,000.00
Press any key to continue . . .
Submitted: 1 year ago.
Category: Homework
Expert:  Raj replied 1 year ago.
Hi There,

I will be helping you with the required solution.
Can you please provide the Programming language in which you need the solution?

Thank you
Customer: replied 1 year ago.

c++

Expert:  Raj replied 1 year ago.
Okay, Can you also let me know the deadline for the solution?
Customer: replied 1 year ago.

may 16

Expert:  Raj replied 1 year ago.
Is it fine if I provide you solution in next 24 hrs?
Customer: replied 1 year ago.

Ok

Expert:  Raj replied 1 year ago.
Okay than I am working on your Requirement and will be posting the solution in next 24 hrs. from now.

Have a Good Day
Customer: replied 1 year ago.
Sorry. I need tha solution in c#. Thank You.
Customer: replied 1 year ago.
C# XXXXX
Expert:  Raj replied 1 year ago.
Ok I will have it ready in C#
Customer: replied 1 year ago.
Thanks.
Customer: replied 1 year ago.
Hi,
I will get it today right.
Expert:  Raj replied 1 year ago.
Yes
Customer: replied 1 year ago.
How long does it take now?
Expert:  Raj replied 1 year ago.
How much time is left?
Customer: replied 1 year ago.
You can give me 3-4 hours.
Expert:  Raj replied 1 year ago.
Ok No Problem. Code will be ready by then....
Customer: replied 1 year ago.
So, Is it almost done?
Expert:  Raj replied 1 year ago.
Yes Just checking the Output....
Customer: replied 1 year ago.
Ok
Expert:  Raj replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
Raj, Engineer
Category: Homework
Satisfied Customers: 1259
Experience: 4 + Experiance in IT Industry
Raj and 12 other Homework Specialists are ready to help you
Customer: replied 1 year ago.
Do I need I comparable here?
Expert:  Raj replied 1 year ago.
I have included the comparable using the option of overloading the operator < and > in the class so that part is implemented in the code.
Customer: replied 1 year ago.
Thanks.
Customer: replied 1 year ago.
Awesome.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience