Recent Feedback
need to build a menu driven program for the student record.
Optional Information: Browser: Firefox Programming Language: c++ Compiler: dev c++ 4.9.9.2 Already Tried: const int MAXRECORD = 500; struct stdRecord { string studentID; string studentName; int courseCode; int creditPoint; }; stdRecord stdRec[MAXRECORD]={"15000000","Joshua XXXXXX XXXXX", 3506, 240, "16666666", "XXXX XXXXXXXX", 3506, 180, "17000010", "Lily Jones", 3639,
Hi,
Welcome to JustAnswer.
My name is XXXXXXXX XXX I will help you for this question.
Let me know the details.
hello
You are required to design a program studentRecord.cpp that will be used to keep track of students’ studies in SCM undergraduate courses. This program will be menu driven, and the user should be able to interactively enter and process on students’ records. More specifically, the program should perform student record searching; list students enrolled in a course, students eligible to graduate and all students of various SCM courses; and update/add/delete a student’s record. As the outputs of above processes, the students’ records should be displayed with all the details including ID, Name, Course Code and Credit Points. Same as usual practice adopted by many real systems, each student’s ID should be unique and be used to determine a record in the developed program.
The following list of specific requirements is roughly in the order of complexity, with the later items being more challenging in general. It is anticipated that one has to have a solid work for items 1-4 of Part I in order to achieve a pass grade for this assignment. Part II is what a student should be able to do well if he or she aims to achieve a credit or above, while Part III is for those who aim at a distinction or higher grade for this assignment.
For simplicity, we always assume that the program will be run under Microsoft Windows.
Part I
1. The program studentRecord.cpp should be menu-driven, and be able to display the menu looked like
MAIN MENU
0. Exit
1. Search for a student
2. List students enrolled in a course
3. List students eligible to graduate
4. List all students
5. Update a student record
6. Add a student record
7. Delete a student record
Your choice ->
You may use system calls such as system(“cls”), system(“pause”) and system(“echo.”) to help maintain the above user interface. You may utilise any parts of the trivial menu in Tutorial 7, the sample menu in Lecture 10, and the programs in the Sample Codes & Solution Folder at the unit website.
2. This is for the implementation of the menu options 1 to 4. For simplicity, we assume that the total number of students will not exceed 500 within the program. To accommodate up to 500 student records, consequently, you can declare an array of structures with this size in the main() of studentRecord.cpp. The array should originally contain three records in order to run the program before adding any new records. As a result, you need to declare and initialize the array with the three records as given below:
const int MAXRECORD = 500;
struct stdRecord
{
string studentID;
string studentName;
int courseCode;
int creditPoint;
};
stdRecord stdRec[MAXRECORD]={"15000000","Joshua XXXXXX XXXXX", 3506, 240,
"16666666", "XXXX XXXXXXXX", 3506, 180,
"17000010", "Lily Jones", 3639, 110};
A counter can be used to record the number of records stored in the array. After initializing the array of structures, for example, the counter should take a value of 3.
Instead of the array of structures, you can also choose to use parallel arrays. You should then declare four arrays with the same size, i.e., string studentID[MAXRECORD], string studentName[MAXRECORD], int courseCode[MAXRECORD] and int creditPoint[MAXRECORD] separately, and initialize them with the above three records.
When menu Option 1 is selected, the program will prompt for a student ID and search for the corresponding student. If the record is found, the details of all the four fields will be displayed in an appropriate format. Otherwise a “Not Found” message should be displayed. The user can then choose to start a new search or return to the main menu. When menu Option 2 is selected, the program will prompt for the course code and then list all students enrolled in the course. To receive a correct input, the program can list all the available course codes (3506, 3633, 3634 and 3639, see Part II 4.) in the prompt. When menu Option 3 is selected, the program will list students eligible to graduate, i.e., those who have achieved 240 credit points. Option 4 will list with all the students enrolled in different courses. As aforementioned, the outputs of the processes option 1~4 should include details of ID, Name, Course Code and Credit Point of each record. Every time the processing of one option is complete, the program should return to the main menu until the exit option is selected.
If you do not plan to implement options 5, 6 and 7, you should write a stub function for each of them.
3. For the program that has been developed up to this point, i.e., the display of the menu and the implementation of the options 0 to 4, draw the Structure Diagram.
The purpose of this part is to implement option 5, 6 and 7 included in the menu of Part-I.
4. When Option 5 is selected, the program should prompt for the ID and perform a search, and if the target record is found, update its courseCode and/or creditPoint (user can choose to update neither, either or both). Otherwise a “Not Found” message is displayed and the user can choose to update another record or return to the main menu. It is assumed that SCM offers four undergraduate courses with the codes as given in Part I. For the credit point, the value should fall in the range 0 ~ 240, as multiples of 10. The validations to the input course code and credit point should be performed accordingly.
5. Option 6 allows the user to add a new record to the array of structures. Since each student’s ID is unique, the function should first search the array to assure that the new ID does not exist in the array, and the record can then be added at the end of the list. Adding a record with an identical ID should be denied. As done in Option 5, the course code and the credit point of the new record should be validated in the same way. Another failure of adding a new record is due to the limitation of the array size, which should be checked at the beginning.
6. The delete (Option 7) command removes one record from the array if the target record is found to match the student ID provided by the user. The program should then make all the records after the deleted one shift leftward to fill the hole caused by the deletion. Again, a message should be displayed if the target record is not found. The user may then choose to delete another record or return to the main menu.
PART-II:
The purpose of this part is to extend and polish that basic program described in Part I&II. The functionality of this extended C++ program, xStudentRecord.cpp, should contain the following additional features.
7. As you may probably notice that the original three student records are sorted in an ascending order according to the student ID. Should Option 6 can add records in right positions, this ascending order would be maintained since all the other operations have no influence to the order. For example, if the fourth record with a studentID "16666656" is to be added in the original list, the record should be put at the second position, i.e., the adding operation should first shuffle the two records with studentID "16666666" and "17000010" rightward to leave space in the array for the new record. For this new requirement, you need to rewrite the function(s) for Option 6 in xStudentRecord.cpp.
It is known that the studentID is a string and can be directly compared using the relational operators. For instance, we have "16666656" < "16666666", "15000000" < "9888888”, and "17000000" < "a000" (not a valid UWS student ID). You should avoid using invalid studentIDs, although this field, together with the studentName, is not required to validate in this assignment.
After rewrite the adding function(s) for Option 6 to maintain the ascending order, you can replace the linear search in studentRecord.cpp by a binary search. If you analyse the binary search carefully, you may find the search can not only check if a target exists in a list, but also find the position to insert the target if it is not in the list yet.
can you help me out
As the question is very lengthy containing two parts, I am sending an under-priced report. You may like to consider it.
i have increased the price so can you help me out clearly.
Thank you.Let me know the deadline.
the deadline is by 3/11/2011 5pm
till when should i wait for the answer?
Relist: Other.letting me know how long will it take or what is going on would help.
hey, whats going on?
Can you let me know the deadline left in hours?
how long will it take around?
Will it be ok if I provide you answer within next 24 hours?
I would like to see the answer in 18hours so that i can have a bit of time to look at. Is it possible?
I will try my best to provide you answer ASAP.
okay. Thank you very much.
Your welcome.
So i will get back to you tomorrow. I mean after like 18hours yeah?? just making sure.thanks
ok
Hi,I have completed the code for part 1.But I didn't get the code for "To receive a correct input, the program can list all the available course codes (3506, 3633, 3634 and 3639, see Part II 4.) "and ". It is assumed that SCM offers four undergraduate courses with the codes as given in Part I."Can you provide me the these codes?
the 4 course code are 3506,3633,3634 and 3639.
Download Part 1 from here. studentRecord.cpp
Download Part 2 from here. xStudentRecord.cppAsk me if you need more information.
can you please check about the option 6. it asks for the studentID and student name at the same time.and also when we choose option 5 what answer are we suppose to give.rest all looks good. now i will get back to you after 8hours. thank you
Let me check.
The programs are working fine here.Here is the output.Option 5 is used to update the records.It will ask for Student ID to update.If student Id does not exists, it will show an error message. Otherwise it will ask whether you want to update course code, if yes, ask for a new value.Then if you want to update credit points, if yes, ask for new value. Then it will update the record.Ask me if you need more information.
CAN YOU PLEASE HELP ME OUT WITH THE STRUCTURE DIAGRAM.?
ok. Please wait Meanwhile you may click ACCEPT.
Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
i did accept it so will you still be helping me out>
I will help you for sure. Please check back for structure chart in 1-2 hours
okay thank you. i was worried for a while. Thank you so much. you can take time for that as i will check in about 7-8hours.
ok :)
Download structure chart from here.Student Record Structure Chart.docx