• Post Reply Bookmark Topic Watch Topic
  • New Topic

using swing/awt/swt/JFace

 
oghenekaro EFEKODO
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tryint to write a program that will produce an output using the sequential search algorithm and the algorithm is as follows:
Assume there's a list of 10,000 tupples(N1,T1)...(N10,000,T10,000)wt filled in values
1.Get value of NAME
2.set the value of i to 1 and the value of FOUND to NO
3.While(FOUND=NO) and (i<=10,000) do step 4 through 9
4.If NAME is equal to Ni then
5.Print the telephone number Ti
6. Set value of FOUND to yes
7. Else
8.Set new value of i to i+1
9. End while
10.If (FOUND=NO)
11.print the message "sorry this name is not in the directory"
12.Stop

The real problem is that,i don't know how go abount developing a java program to handle the sequential search to generate an approppriate output.could you give me a sample code to build on.thank you
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does this have to do with the topic of this forum and the subject of your thread?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The subject line should probably have read "Can someone do my homework for me?"

Which isn't going to happen around here. We help people learn java. Not do their work for them. Since I've linked it for you twice, I'll assume you've read our FAQ on how to ask questions on JavaRanch.

What you will want to provide is what you have tried thus far, what is not working, and what you need help with specifically. What part of the requirements do you not understand? Then we'll be more than happy to shove you in the right direction.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!