Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

need to build a menu driven program for the student record

 
LogicPro's Avatar
  • Answered by:LogicPro
  • Computer Software Engineer
  • Positive Feedback: 99.4 %
  • Accepted Answers: 5549
Verified Expert
in Programming

Recent Feedback

Positive
fast response.
Positive
fast response
Positive
great
Positive
Thank you
Positive
Thank you
Positive
He responded quickly to my question with a solid answer.
Positive
Perfect as usual
Positive
thank you
Positive
thank you
Positive
Outstanding help!

Customer Question

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,

Submitted: 520 days and 8 hours ago.
Category: Programming
Value: AU$114
Status: CLOSED
Picture
Expert:  LogicPro replied 520 days and 8 hours ago.


LogicPro :

Hi,

LogicPro :

Welcome to JustAnswer.

LogicPro :

My name is XXXXXXXX XXX I will help you for this question.

LogicPro :

Let me know the details.

Customer :

Full Size Image

Customer :

hello

Customer :

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.

Customer :

can you help me out

Picture
Expert:  LogicPro replied 520 days and 8 hours ago.

As the question is very lengthy containing two parts, I am sending an under-priced report. You may like to consider it.

Customer replied 520 days and 8 hours ago.

i have increased the price so can you help me out clearly.

Picture
Expert:  LogicPro replied 520 days and 8 hours ago.

Thank you.
Let me know the deadline.

Customer replied 520 days and 8 hours ago.


the deadline is by 3/11/2011 5pm

Customer replied 520 days and 7 hours ago.

till when should i wait for the answer?

Customer replied 520 days and 7 hours ago.

Relist: Other.
letting me know how long will it take or what is going on would help.

Customer replied 520 days and 6 hours ago.

hey, whats going on?

Picture
Expert:  LogicPro replied 520 days and 6 hours ago.


Can you let me know the deadline left in hours?

Customer replied 520 days and 6 hours ago.

how long will it take around?

Picture
Expert:  LogicPro replied 520 days and 6 hours ago.

Will it be ok if I provide you answer within next 24 hours?

Customer replied 520 days and 6 hours ago.

I would like to see the answer in 18hours so that i can have a bit of time to look at. Is it possible?

Picture
Expert:  LogicPro replied 520 days and 6 hours ago.

I will try my best to provide you answer ASAP.

Customer replied 520 days and 6 hours ago.

okay. Thank you very much.

Picture
Expert:  LogicPro replied 520 days and 6 hours ago.

Your welcome.

Customer replied 520 days and 6 hours ago.

So i will get back to you tomorrow. I mean after like 18hours yeah?? just making sure.
thanks

Picture
Expert:  LogicPro replied 520 days and 6 hours ago.

ok

Picture
Expert:  LogicPro replied 520 days ago.

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?

Customer replied 519 days and 20 hours ago.

the 4 course code are 3506,3633,3634 and 3639.

Picture
Expert:  LogicPro replied 519 days and 19 hours ago.

ok

Picture
Expert:  LogicPro replied 519 days and 16 hours ago.

Download Part 1 from here. studentRecord.cpp

Picture
Expert:  LogicPro replied 519 days and 16 hours ago.

Download Part 2 from here. xStudentRecord.cpp

Ask me if you need more information.

Customer replied 519 days and 15 hours ago.

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

Picture
Expert:  LogicPro replied 519 days and 15 hours ago.

Let me check.

Picture
Expert:  LogicPro replied 519 days and 10 hours ago.

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.

Customer replied 519 days and 2 hours ago.

CAN YOU PLEASE HELP ME OUT WITH THE STRUCTURE DIAGRAM.?

Accepted Answer

Picture
Expert:  LogicPro replied 519 days and 2 hours ago.

ok. Please wait Meanwhile you may click ACCEPT.

Expert TypeComputer Software Engineer
Category: Programming
Pos. Feedback: 99.4 %
Accepts: 5549
Answered: 11/3/2011

Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

Ask this Expert a Question >
Customer replied 519 days and 2 hours ago.

i did accept it so will you still be helping me out>

Picture
Expert:  LogicPro replied 519 days and 2 hours ago.

I will help you for sure. Please check back for structure chart in 1-2 hours

Customer replied 519 days and 2 hours ago.

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.

Picture
Expert:  LogicPro replied 519 days and 2 hours ago.

ok :)

Picture
Expert:  LogicPro replied 519 days and 1 hours ago.

Download structure chart from here.
Student Record Structure Chart.docx

 
Tweet

9 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
is there a python programming person available 3/28/2013
Write a menu-driven program that allows users do two options: Option 3/27/2013
1. Which one of the following control structures provides for 3/27/2013
JavaScript: Multiple Choice Questionnaire 3/25/2013
RA-211 3/24/2013
How do you create a searchable public Google drive folder in 3/24/2013
RA-211 3/24/2013
I am an entrepreneur with no current coding skills, but an 3/23/2013
I have base code in VBA that opens all excel files from a folder 3/23/2013
Program in C++ 3/23/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

In The News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More
close
Find Expert answers related to your question.
Sign up using email
We will never post anything without your permission.
Already have an account? Sign in

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
189 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us
© 2003-2013 JustAnswer LLC