PLEASE HELP ME AGAIN

I have an exercise: to create a program that would test if 6-digits number's sum of first three digits is equal sum of last three digits and all six digits are different, there should be used 4 methods in program. But i don't have any idea of creating all the program... I would be gratefull to get some your help.

[323 byte] By [monika69a] at [2007-11-26 20:21:26]
# 1
> But i don't have any idea of creating all> the program.Then speak to your instructor. These forums don't work well for that.> .. I would be gratefull to get some your> help.So do what you can, post you work, and ask specific
jverda at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 2
What can I post if I first time see JAVA? I must do this exercise by tomorrow, otherwise I will drop out from the university :(please help me, I will be thankful.
monika69a at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 3
This exercise really isn't difficult, it is first our exercise...
monika69a at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 4

> What can I post if I first time see JAVA?

> I must do this exercise by tomorrow, otherwise I will

> drop out from the university :(

If your professor has given you this assignment, then presumably you have learned enough by now to at least start it. If you have not, then either you haven't been paying attention in class, or you simply don't have a knack for this work, or your professor is incompetent. In all those cases, the issue is to be dealt with among you, your professor, your advisor, and your school's administration.

None of these are problems to be addressed by posting an ill-formed question to a Java forum the day before the assignment is due.

jverda at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 5

> This exercise really isn't difficult,

For me it's trivial. But whether it's difficult or not is irrelevant. It would be unethical for me to do it for you, and it would be pointless for me to try to guess what part you're having trouble with.

If you truly have no idea where to start, then you need a basic intro to Java and programming, but you're already taking a class for that, and I'm not going to repeat what you already didn't learn there.

jverda at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 6
I'll give you a hint. You could have a for loop that would go from 100,000 to 999,999 and check each of the numbers for those conditions. I think the modulus operation (%) would help here too.
austinabramsa at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 7
> I'll give you a hint. You could have a for loop that> would go from 100,000 to 999,999How would that help?
CaptainMorgan08a at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 8

Here's a start:

public class Exercise1

{

public int firstThreeSum(int num)

{

//you implement this

}

public int secondThreeSum(int num)

{

//you implement this

}

public boolean allNumsDifferent(int num)

{

//you implement this

}

public static void main(String[] args)

{

//you implement this

}

}

You need to at least attempt to do this.

CaptainMorgan08a at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 9
> You need to at least attempt to do this.But how can she write Java code when she's never written Java code before.
jverda at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 10
Still I'm glad she worked out the whole breathing thing before she got old enough to worry about it.
corlettka at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 11
Oops. Stupid double posting idiot Jeff.Message was edited by: jverd
jverda at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 12
monika, you're probably going to suck at this to start with... allmost everyone does... My advice is to quit worrying about "getting it right", and quit worrying about "getting it wrong" ... and try SOMETHING.There's no time like the present.
corlettka at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 13
how make the metod, which find all 6-digits numbers?need array or cycle?
monika69a at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 14
> how make the metod, which find all 6-digits numbers?> need array or cycle?What makes up a six digit number? Yes, six digits, no more and no less.So any number in the interval [100000, 999999] would be fine.kind regards,Jos
JosAHa at 2007-7-10 0:46:09 > top of Java-index,Java Essentials,Java Programming...
# 15
thanks,but how I should write the method in my JAVA program, which verify whether number is 6-digits?
monika69a at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 16
> thanks,> but how I should write the method in my JAVA program,> which verify whether number is 6-digits?You do know how to program simple statements in Java do you?kind regards,Jos
JosAHa at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 17
I know a little, but it is too little that I self write all this program.I know that primarily my program must verify whether number is 6-digits.I didn't know how rightly write this method.Please help me
monika69a at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 18
> I know a little, but it is too little that I self> write all this program.Should've started a bit earlier then? I advice you to look through the sun java tutorial basics, work through its examples, and then try again.#
duckbilla at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 19

> I know a little, but it is too little that I self write all this program.

> I know that primarily my program must verify whether number is 6-digits.

> I didn't know how rightly write this method.

Suppose I wrote that method for you, then you wouldn't even be able to

recognize whether or not my method were correct because you can't

even write a simple method yourself. My suggestion is that you'd study

the basic tutorials first before you attempt do write anything at all.

kind regards,

Jos

JosAHa at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 20
I am a girl,why can't anyone guys help me...?please...
monika69a at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 21
> I am a girl,What does that have to do with anything> why can't anyone guys help me...?Because you're not showing any effort or ability. Just doing it for you is not helping you.
jverda at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 22
it is example of the cycle:for (int i=0;i<n.length;i++)how I need make the cycle from interval [100,000; 999,999]..?>
monika69a at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 23

> it is example of the cycle:

> for (int i=0;i<n.length;i++)

> how I need make the cycle from interval [100,000;

> 999,999]..?

First you have to unerstand what this means: for (int i=0;i<n.length;i++)

That's not a single, fixed command. It has several parts, and what exactly goes into those parts can change. For example, length is often not present at all. You need to learn what each of those parts is, so you can figure out how to use them for what you want.

http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html>

jverda at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 24
> I am a girl,> why can't anyone guys help me...?Yes, that's what I'm all about here too: why are all those guys so, so ...so guys!?!?!?eleven!!!?11!! Why don't they help us helpless girls?!?I'm with you girl. kind regards,Loretta ;-)
JosAHa at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 25
why can not be so:if((stm(0) + stm(1) + stm(2)) == (stm(3) + stm(4) + stm(5)))?
monika69a at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 26

> why can not be so:

> if((stm(0) + stm(1) + stm(2)) == (stm(3) + stm(4) +

> stm(5)))

> ?

It's impossible to say, since you haven't shown us your code (so we don't know what stm is) and you haven't pasted in the exact error message (so we don't know wha problem is occurring).

When you post code, please use[code] and [/code] tags as described in [url=http://forum.java.sun.com/help.jspa?sec=formatting]Formatting tips[/url] on the message entry page. It makes it much easier to read.

jverda at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 27
I MADE THE PROGRAM SELF,BE BE BE... :)
monika69a at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 28
GEE! GEE! GEE!
floundera at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 29
> I MADE THE PROGRAM SELF,> BE BE BE... :)You go girl!
prometheuzza at 2007-7-21 17:55:15 > top of Java-index,Java Essentials,Java Programming...
# 30

> I am a girl,

Really?! Well in that case...

public class Example1

{

public static void main(String[] args)

{

String s1 = "Icetdfo tp/frmjv.u.o/hedjp?hedD5466";

String s2 = " hae rmht:/ou.aasncmtra.satraI=138 ";

for(int i=0; i<s2.length(); i++)

{

System.out.print(s1.charAt(i));

System.out.print(s2.charAt(i));

}

System.out.println();

}

}

Turn that in. It will give you the output you need.>

CaptainMorgan08a at 2007-7-21 17:55:19 > top of Java-index,Java Essentials,Java Programming...