Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Help writing a java program

  • 23-09-2009 7:23pm
    #1
    Registered Users, Registered Users 2 Posts: 3,599 ✭✭✭


    This post has been deleted.


Comments

  • Registered Users, Registered Users 2 Posts: 2,598 ✭✭✭LowOdour


    Couple of things id advise;

    1 - you would have been better of posting this in the Programming section...you would easily get more replies.

    2 - If thats all the effort you have put before posting then you may have problems getting people to help you. To me,it doesnt look like you have tried too hard to get anything working. If you really are stuck then fair enough


  • Registered Users, Registered Users 2 Posts: 3,599 ✭✭✭sashafierce


    This post has been deleted.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    1 - you would have been better of posting this in the Programming section...you would easily get more replies.
    Not with the "No Homework" rule there he wouldn't.
    Smart arse i wouldnt put it on here if i wasnt stuck ok. Not my choice to do programming, if i dont get it not my fault!!!!
    Calm.

    I'm happy to leave this here for now, on the provision that noly hints on how to continue are added. No direct code. The OP needs to learn how to do this for himself, so no harm in helping him break the question down but do not give the answer.


  • Registered Users, Registered Users 2 Posts: 3,599 ✭✭✭sashafierce


    This post has been deleted.


  • Registered Users, Registered Users 2 Posts: 2,598 ✭✭✭LowOdour


    OK, a very basic way of doing this
    use your tax varibale to set tax percentage. So do your if statesments (like you have started already) e.g if income is less than 10000, set tax to 0. if between 10000 and 25000 set to 28 etc. next calulating the tax is simple - its your basic percentage calculation, and then subtract that from the income to get take home pay.

    The logic is straight forward if you write it out. What you need to do is be able to enter and pick up the value entered and use that when calculating the income.
    Just a question, what course are you doing if programming is not your choice to do?


  • Advertisement
  • Closed Accounts Posts: 1,619 ✭✭✭Bob_Harris


    LowOdour wrote: »
    OK, a very basic way of doing this
    use your tax varibale to set tax percentage. So do your if statesments (like you have started already) e.g if income is less than 10000, set tax to 0. if between 10000 and 25000 set to 28 etc. next calulating the tax is simple - its your basic percentage calculation, and then subtract that from the income to get take home pay.

    That's what I did in the programming forums version of this thread and I was told I had a serious miscalculation :confused:


  • Registered Users, Registered Users 2 Posts: 2,598 ✭✭✭LowOdour


    Bob_Harris wrote: »
    That's what I did in the programming forums version of this thread and I was told I had a serious miscalculation :confused:


    Oh, just seen the thread in Programming.
    Well the guy who replied to you saying "I hope you aren't writing any code for the Revenue" has got it spot on...you arent writing code for the Revenue. As this is a beginners application, im sure she or her lecturer arent too concerned about the proper way of calculating tax. what we both mentioned will calculate what she asked for in her post.


  • Registered Users, Registered Users 2 Posts: 590 ✭✭✭bman


    This post has been deleted.

    Who gives a shít! He's helping you out and you're shouting "I'm a girl" back at him! Learn how the internet works or don't use it.

    Anyway, what LowOdor said. You've 3 "conditions" you can check for. Set your tax variable accordingly depending on the condition. Do the tax calculation. Print the output.


  • Closed Accounts Posts: 909 ✭✭✭Captain Furball


    no point in helping "her" she wont be back to say thanks anyway,


  • Registered Users Posts: 760 ✭✭✭mach1982


    Hey guys I agree that that she should go off and attempt it, only way to learn and learnt that the hard way :-), but from look at her passed posts I looks like she may be a mature student, and seems it a mandatory course for her.

    I'm not that hot on java so maybe someone who is good could PM her become a kind of mentor, i would have love a mentor when I was doing CS in NUIM , or she could seek out her local compsoc.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    This post has been deleted.

    A pretty rude one it seems. Any more rudeness from you and this thread is gonna get locked and I'll give you a temp ban.


Advertisement