Results 1 to 4 of 4
Thread: HELP PLEASE! Need reply ASAP
- 10-21-2009, 07:14 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 31
- Rep Power
- 0
HELP PLEASE! Need reply ASAP
There are two parts I need help with.
Here is my code for the first method
public static boolean isOdd (int x)
{
if (x%2==1)
{
return true;
}
else
{
return false;
}
}
I declared this in a separate file than my main method and I need to know how to test it in the main method.
2.
public static boolean closeAccount (double acctBalance, int checksLeft) {
if ((acctBalance < 0)||(checksLeft <= 0))
return true;
else
return false;
// returns true if acctBalance is less than zero or checksLeft is less than or equal to zero.
}
public static boolean closeAccount (int acctBalance, int checksLeft) {
if ((acctBalance < 0)||(checksLeft <= 0))
return true;
else
return false;
I also need to know how to test these two methods in the main method.
- 10-21-2009, 07:23 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
By calling them?
import package.Class;
Class.method(arguments)
- 10-21-2009, 08:03 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 31
- Rep Power
- 0
when i call the methods in the main method it returns true or false. this puts nothing in the output. I need a way to test these methods so that something happens in the output that reflects that the methods work.
- 10-21-2009, 08:28 AM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Similar Threads
-
Need answer asap!!!
By uranis_khai in forum New To JavaReplies: 3Last Post: 07-07-2009, 09:48 AM -
Please reply to help Me ......
By mohamed sherif in forum New To JavaReplies: 3Last Post: 12-02-2008, 07:05 PM -
Need Java Help ASAP
By L-dog in forum New To JavaReplies: 22Last Post: 10-02-2008, 11:54 PM -
Same old Question please reply
By venat123 in forum New To JavaReplies: 1Last Post: 12-18-2007, 12:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks