Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Calculate total earning of a worker

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Calculate total earning of a worker

    I did this practice work on my own.
    CALCULATE THE TOTAL EARNING OF A WORKER.
    Total earning of a worker
    Total earning;
    {
    public static void main(string)[] args) {
    // Total Amount
    Int Housing allowance (HA) {Housing allowance=HA;}
    Int Basic salary (BS) {Basic salary =BS;}
    Int Feeding allowance {Feeding allowance =FA;}
    Int Transport allowance {Transport allowance=TA;}
    Int Miscellaneous allowance {Miscallaneous allowance=MA;}

    // Adding total earning

    system.out.println ("Adding");
    system.out.pintln ("HA+BS+FA+TA+MA = "+(HA+BS+FA+TA+MA));

    }
    }


  2. #2
    Member
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    84
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: Calculate total earning of a worker

    What is your question you need help with?

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Calculate total earning of a worker

    i want to confirm if it is correct .
    thanks

  4. #4
    Junior Member
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    20
    My Mood
    Bored
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Calculate total earning of a worker

    Does it work for you?
    And also highlight the code with the [code=java] tags next time.

  5. #5
    Member
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    84
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: Calculate total earning of a worker

    I asume you have an program where you write the code with, like eclipse.
    If you run the code and it works without errors it will be good for every computer with that system. (like if you use Windows it is good for Windows computers, most of the times all programs will work of diffrent systems. It only matter when you call the terminal. But that is more advanced.)

  6. #6
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Calculate total earning of a worker

    Quote Originally Posted by Shalom View Post
    i want to confirm if it is correct .
    thanks
    What happens when you try to compile it?

Similar Threads

  1. Total Sales Error
    By KRUKUSA in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 19th, 2012, 08:20 PM
  2. Program to calculate pay and total sum with daily increment. Urgent!
    By ePerKar3 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: December 5th, 2011, 01:20 PM
  3. Total NOOB question
    By coolidge in forum Java Theory & Questions
    Replies: 3
    Last Post: September 2nd, 2011, 04:09 PM
  4. I trying to calculate total price.
    By Muhanguzi in forum JDBC & Databases
    Replies: 6
    Last Post: June 15th, 2011, 03:35 PM
  5. Calling worker methods in JSF.
    By newbie in forum Web Frameworks
    Replies: 0
    Last Post: March 18th, 2011, 02:21 PM

Tags for this Thread