Results 1 to 2 of 2
  1. #1
    tasha is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default pls help me with this , its urgent ! thanks.

    1. Write a method that will return the sum of all digits in an integer. The method signature is as follows:
    (for example, sum(1234) returns 10 and sum(12345) returns 15.)
    public static int sum(int number)


    2. Write a method that returns the number of days in a year using the following header:
    public static int numberOfDaysInAYear(int year)

    Write a test program that displays the number of days in year 2000, ..., and 2010.

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

    Default Re: pls help me with this , its urgent ! thanks.

    You have recently posted the following question in the forum:

    Quote Originally Posted by tasha View Post
    1. Write a method that will return the sum of all digits in an integer. The method signature is as follows:
    (for example, sum(1234) returns 10 and sum(12345) returns 15.)
    public static int sum(int number)


    2. Write a method that returns the number of days in a year using the following header:
    public static int numberOfDaysInAYear(int year)

    Write a test program that displays the number of days in year 2000, ..., and 2010.
    Your post is called a "homework dump" as you have posted your assignment but have not shown any work. As this is not allowed, I've locked this post, and invite you instead to repost your question. In your new post, consider ...
    • Give us an informative thread title, one that summarizes your specific problem.
    • Avoid using "urgent" and similar words as experience has shown that this will do nothing but turn many folks off from helping you.
    • Show what you've done
    • Ask as specific questions as possible such as how to fix such-and-such bug.
    • If you are completely stuck, contact your instructor for one-on-one help.
    • Also look at this link as it's very helpful suggestions: So, You Need to Write a Program but Don't Know How to Start
    • And this link to help you write better forum questions: How To Ask Questions The Smart Way


    Best of luck.
    Last edited by Fubarable; 09-11-2011 at 09:19 PM.

Similar Threads

  1. Urgent
    By agentkiran007 in forum Advanced Java
    Replies: 23
    Last Post: 08-08-2010, 03:59 PM
  2. I need help is very urgent
    By ramroum in forum Java Applets
    Replies: 15
    Last Post: 06-27-2010, 03:08 AM
  3. [URGENT]SHA Encryption System...need urgent helps
    By java_idiot in forum New To Java
    Replies: 6
    Last Post: 05-02-2010, 10:04 AM
  4. Urgent!!!
    By winnie99 in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 12-18-2009, 03:17 PM
  5. very urgent
    By nehaa in forum Networking
    Replies: 12
    Last Post: 01-23-2009, 05:46 PM

Posting Permissions

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