Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

Using a structured memory defined as following:struct record{ char lastName[100]; char iD[50]; int score;};to write a program that 1. Ask a user to size of a waiting list, which is the largest number of students that will be allowed to put on the waiting list. 2. According the user input, dynamically allocate an array of type of “record” defined above called waitingList. If the user input is n, then such array should have n elements. 3. Declare an integer variable called waitingListLength, the value of this variable should represent the number of students that are already on the waiting list. 4. Display a menu as following: ******************************************** * 1. Add a student to the waiting list * * 2. Remove a student from the waiting list * * 3. Display the waiting list * * 4. Do nothing. * ******************************************** 5. Ask the user to make a choice. 6. According to the user input, perform the action accordingly 7. If user wants to add a student to the waiting list, then check the length of the waiting list first. If the length of the waiting list is the same as the size of the waiting list, then print a message “The waiting list is full!” Otherwise, ask user to input all the information about the student and store them in the array. The students should be added to the waiting list in a order from the left to the right. That means, the information about the first student on the waiting list should be stored in waitingList[0], and so on. Do forget each time when a student is added to the waiting list, the length of the waiting list should be updated. 8. If user wants to remove a student from the waiting list, shift all the elements in the array to the left by one place, which means the first student on the waiting list should be the one that is removed.. Again, the length of the waiting list should be updated each time a student is removed from the waiting list. 9. If user chooses to display the waiting list, print out all the information about the students currently on the waiting list. If there is no student on the waiting list, print out the message “The waiting list is empty.” 10. Using while looping statement to allow user to perform multiple actions without exit the program unless the user wants to terminate the program. A user will do so by selecting number 4 option on the menu.

OpenStudy (farmdawgnation):

Sorry, this is not a place where we're going to do the whole assignment for you. If you have specific questions feel free to ask them, but don't expect us to do all the work for you. :) Thanks!

OpenStudy (anonymous):

yea i was just asking what it was asking cause it is confusing me

OpenStudy (espex):

Well, it defines a structure for you to use and then asks you to prompt the user for a number. Using the number provided by the user, dynamically create an array of "records" that will hold the list of students. Next you are to declare an integer value equal to the number of "students" already on the list you created earlier. Then you will create the menu display, as outlined in #4, and depending on what the user picked, perform a function. Instructions 7,8, and 9 describe what your program should do if the user picks that option. Finally you are to wrap the main body of your program in a "while" loop that runs until the user enters a '4' from the menu. That's it.

OpenStudy (anonymous):

ok so how would i dynamically create an array of records

OpenStudy (espex):

Depends on the language you're using. In C for example, you would use malloc().

OpenStudy (anonymous):

i am using c++ and i was wondering if i need to use a class queue after the user inputs the size the wait list after step 1 and what that was

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!