# Thread: pls help me with this , its urgent ! thanks.

1. Member
Join Date
Sep 2011
Posts
2
Rep Power
0

## 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. ## Re: pls help me with this , its urgent ! thanks.

You have recently posted the following question in the forum:

Originally Posted by tasha
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

Best of luck.
Last edited by Fubarable; 09-11-2011 at 10:19 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
•