Chapter 9: Arrays and Searching and Sorting
Level 2, Problem 3
Due Date: Tuesday, April 29, 2008 Level 2, Problem 3 (Klingon Prisoners) TASK
Create a flowchart for a program that allows the user to enter the name, ship, and prison cell number for prisoners in the Klingon prison colony. The data should be stored in three parallel arrays, and the arrays should be alphabetized by prisoner name. The user should be able to display information about a particular prisoner when his or her name is entered.
Use QBasic to write a program that allows the user to enter the name, ship, and prison cell number for prisoners in the Klingon prison colony. The data should be stored in three parallel arrays, and the arrays should be alphabetized by prisoner name. The user should be able to display information about a particular prisoner when his or her name is entered.
Your program should include the following:
·Correct use of three parallel arrays
·Use of binary search to locate prisoners by name
·Correct, formatted output
I am not kidding this is what it really says, lol
The Klingons have captured Spock, science officer of the U.S.S. Enterprise. Captain Kirk has broken into their prison colony to free him. He has reached the computer that possesses information concerning all of the prisoners, including their cell numbers. Write a program to prompt the user to enter the following data into the program. The data should be stored in all three parallel arrays:
Prisoner Ship Cell#
Kanobi Falcon 328
Spock Enterprise 562
Yoda None 122
Mudd Pleasure Dome 222
Khan Botany Bay 009
Jetson Astrofly 468
Rogers Galaxy 2 727
Koeing Alpher 999
Adama Galactic 987
Who Tardis 585
Alphabetize the data by name, and display information regarding a prisoner when his or her name is entered. Use a binary search routine in your program to speed Captain Kirk's search for Spock.
Hey.. That is the homework I have to do... I am stressed out because I have high-school work to do over this.. I will get back to this post later today.. I will need help on this program I believe.. or at least someone yo walk me through it.. I don't know how to code an array or nothing, lol ... at lunch at school right now.. I know some of you guys are just itching for a problem to work on, lol.. I was like that but It turned out a change of lifestyle can throw you off balance.
I am only taking QBasic because it was a requirement for taking Visual Basic.... and guess what... Where I live now... it ISN'T!!! now I am taking 2 college classes and 4 high-school classes.. help meh please, lol
Tomorrow - 4/24/08 I will post some code I will create for this program....
When I do post the code I will probably need someone to walk me through some of it..
Thanks for your help