Results 1 to 7 of 7
  1. #1
    thomachan21 is offline Member
    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Exclamation Probably Wrong Section But need to do IRS program in Java (Blue J)

    Hi there I have to do a java program that requires making an example as if ur filling out an IRS form... I have the assignment and will copy and paste it. Any help would be appreciated. As im not that very good with this stuff ;P since it only is my 2nd week in this course....

    To summarize it.
    If you can write the functioning code for it as if you were actually writing it yourself and using it... that would really be helpful... and thank u so much for ur time

    Background:
    Federal income tax rates can be calculated using tax rate schedules. The following are tax rates for two out of the four categories used by the IRS in 2001:
    Schedule X - Single
    If your taxable income is:
    over - but not over - your tax is of the amount over -
    $ 0 $ 27,050 15 % $ 0
    27,050 65,550 $ 4,057.50 + 27.5 % 27,050
    65,550 136,750 $ 14,645.00 + 30.5 % 65,550
    136,750 297,350 $ 36,361.00 + 35.5 % 136,750
    297,350 --------- $ 93,374.00 + 39.1 % 297,350
    Schedule Y-1 - Married filing jointly
    If your taxable income is:
    over - but not over - your tax is of the amount over -
    $ 0 $ 45,200 15 % $ 0
    45,200 109,250 $ 6,780.00 + 27.5 % 45,200
    109,250 166,500 $ 24,393.75 + 30.5 % 109,250
    166,500 297,350 $ 41,855.00 + 35.5 % 166,500
    297,350 --------- $ 88,306.00 + 39.1 % 297,350
    To test your understanding, follow this example of a single person with taxable income of $68,000:
    Tax is $14,645.00 + 0.305*(68000-65550) = $14,645.00 + $747.25 = $15,392.25
    Assignment:
    1. One of the biggest mistakes that beginning programmers tend to make is to attempt solving the problem within their code before they really understand how to work the problem. Use the following values and solve each of them before you begin to write your program out.
    a. $50,000 Married __________
    b. $25,000 Single __________
    c. $300,000 Married __________
    d. $170,000 Single __________
    e. $30,000 Married __________
    f. $500,000 Single __________
    g. $170,000 Married __________
    Programming Assignment: IRS
    h. $45,000 Single __________
    i. $130,000 Married __________
    j. $120,000 Single __________
    2. Write a class that:
    a. Prompts the user for the following information:
    Filing status: Single or Married (entered as 1 for Single and 2 for Married)
    Taxable income
    b. Calculates and prints:
    Filing status
    Taxable income
    Federal tax
    3. Example run:
    Enter marital status (1=single, 2=married): 1
    Enter taxable income: $ 35125
    Your Federal tax = $ 6,278.13
    4. Use these values for your run output:
    Single, $15,500
    Single, $100,000
    Single, $ 480,000
    Married, $50,000
    Married, $125,000
    Married, $ 400,000

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: Probably Wrong Section But need to do IRS program in Java (Blue J)

    Which part of this are you stuck on? What have you tried?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    thomachan21 is offline Member
    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Default Re: Probably Wrong Section But need to do IRS program in Java (Blue J)

    I just dont understand the concept of taxes... or know how to exactly make a program that calculates taxes... I made one earlier for my first time. and tried doing the same type of methods i did.. but with different information.. and it doesnt work....

    here it is... I believe it was unfinished.. but maybe this could shine some light, and maybe you can help me through this code.

    import java.text.DecimalFormat;
    public class Taxes
    {
    private final double Fed_Tax_Rate = 0.154;// Federal Tax Rate
    private final double FICA_Tax_Rate = 0.0075;// FICA Tax Rate
    private final double State_Tax_Rate = 0.04;// State Tax Rate

    private double myHours;// Total hours worked
    private double myRate;// Hourly Pay Rate
    private double myGrossPay;// Total pay before taxes

    public Taxes(double Hours, double Rate)// Calculate gross pay from total hours worked and hourly pay rate
    {
    myHours= Hours;
    myRate= Rate;
    myGrossPay = Rate * Hours;

    }
    public double getGrossPay()// Gets gross pay and doubles
    {
    return myGrossPay;
    }
    public double getHours()// Gets hours and doubles
    {
    return myHours;
    }
    public double getRate()// Gets hourly rate and doubles
    {
    return myRate;
    }
    private String customFormat(String pattern, double value)// Format and return the given numerical value in the manner requested
    {
    DecimalFormat myFormatter = new DecimalFormat(pattern);
    return (myFormatter.format(value));
    }
    }


    Does it have any correlation.. to the IRS program?

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: Probably Wrong Section But need to do IRS program in Java (Blue J)

    I'm not sure, you tell me. What does this program output? Does it output what you expect? Does it output what the IRS assignment is asking for?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    thomachan21 is offline Member
    Join Date
    Nov 2012
    Posts
    11
    Rep Power
    0

    Default Re: Probably Wrong Section But need to do IRS program in Java (Blue J)

    I am going to be ashamed to say this.. but I dont even have the base code for the.. well IRS program.... thats why I figured maybe you can work with me and help get this thing solved?

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: Probably Wrong Section But need to do IRS program in Java (Blue J)

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Probably Wrong Section But need to do IRS program in Java (Blue J)

    We're much better at helping answer specific questions, questions that usually arise after you've tried some solution. It looks to me like this would be a good time to approach your teacher or instructor for assistance.

Similar Threads

  1. Blue Pelican Java: Help with Encryption/Decryption
    By ohwegg1 in forum New To Java
    Replies: 0
    Last Post: 01-29-2012, 12:48 AM
  2. Wrong Output (Java Program)
    By poupas in forum New To Java
    Replies: 12
    Last Post: 11-28-2010, 04:28 PM
  3. Java error while britannica library section
    By ebooker in forum New To Java
    Replies: 2
    Last Post: 09-11-2010, 02:22 PM
  4. Replies: 2
    Last Post: 10-14-2009, 08:37 PM
  5. Intermediate Java section?
    By fishtoprecords in forum Suggestions & Feedback
    Replies: 6
    Last Post: 07-17-2008, 12:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •