Results 1 to 10 of 10
- 12-03-2008, 08:54 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
- 12-03-2008, 09:00 PM #2
while(some condition){
do some stuff
}
in your case something along the lines
while(number of students not equal to 10){
add student
}
- 12-03-2008, 09:05 PM #3
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
Can you show me with the attached file?
- 12-03-2008, 09:06 PM #4
Just to give you a basis of a while loop:
while(this statement is true){
do this
}
so what your structure would look look like in pseudo-code:
while(there's still information to get){
get the name and store it
}
So some questions you can ask yourself:
How long do I want to keeping doing this statement?
If the while loop statement is true, what do I want to do?
Hope this helps start you off :)miss.meli (-.-)zzZZ
- 12-03-2008, 09:07 PM #5
I'm not going to write your project for you. That's as simple as your program gets. Show some effort and make your own code and if you get stuck post it here and we can look at it.
- 12-03-2008, 09:07 PM #6
Are you using a Scanner or that attached file to get the information?
miss.meli (-.-)zzZZ
- 12-03-2008, 09:19 PM #7
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
it's just the attached file with the information. I'm not asking you to write my code, just start it for me so that I can see how to do. That's all.
- 12-03-2008, 11:32 PM #8
Member
- Join Date
- Oct 2008
- Posts
- 34
- Rep Power
- 0
Why can't you start it off?
-
You're going to find a lot more here willing to help you if you show your efforts first. Show us the code you've created to try to solve this problem, and post it here. Also post any error messages you get or how the code isn't working. If your reply is "I don't even know where to begin" then our reply would be to either have you go to the Sun intro to Java tutorials or perhaps better sit down with your teacher for a one-on-one tutorial session.
Best of luck.
- 12-03-2008, 11:52 PM #10
here's my idea...
- ask the number of students that are going to be entered (x)
- create an array of x string elements (x = the number that was entered above)
- within a for cycle:
- ask the name of the student
- assign the string to an array element
- Print the numbers and names of the students using the student array
Chris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
Similar Threads
-
Looking for Estandard Structure oj J2EE
By VirtualArq in forum Advanced JavaReplies: 0Last Post: 09-18-2008, 06:21 PM -
data structure code
By vgvt in forum New To JavaReplies: 1Last Post: 01-17-2008, 02:49 PM -
repetition of 'arguments'(?)
By Igor in forum New To JavaReplies: 3Last Post: 12-13-2007, 10:08 AM -
Use if then else structure, help
By paul in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:00 AM -
Help with Structure
By Albert in forum New To JavaReplies: 1Last Post: 07-13-2007, 03:27 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks