Categories: Assignment Help

Menu-Driven C++ program Assignment Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It shou

Menu-Driven C++ program Assignment

Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It should work something like this (user input highlighted in blue):

Don't use plagiarized sources. Get Your Custom Essay on
Menu-Driven C++ program Assignment Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It shou
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!
Order Essay

Array size: 0, capacity: 2
MENU
A Add a student
D Delete a student
L List all students
Q Quit
…your choice: a[ENTER]

Enter the student name to add: Jonas-Gunnar Iversen[ENTER]

Array size: 1, capacity: 2
MENU
A Add a student
D Delete a student
L List all students
Q Quit
…your choice: a[ENTER]

Enter the student name to add: Marcela Nogueira[ENTER]

Array size: 2, capacity: 2
MENU
A Add a student
D Delete a student
L List all students
Q Quit
…your choice: l[ENTER]

Student Roster
————–
Jonas-Gunnar Iversen
Marcela Nogueira

Array size: 2, capacity: 2
MENU
A Add a student
D Delete a student
L List all students
Q Quit
…your choice: d[ENTER]
Enter the student name to delete: Jonas-Gunnar Iversen[ENTER]

Array size: 1, capacity: 2
MENU
A Add a student
D Delete a student
L List all students
Q Quit
…your choice: q[ENTER]

Requirements

Allow the menu options to be entered in either lower or upper case.
Implement all the actions in the above menu — add, delete and list.
Use a dynamic array of strings to store the roster, with an initial capacity of 2.
Double the array capacity when (a) you have a new student to add, and (b) size equals capacity. You do not need to shrink the array after deletes.
The output table should have a column heading as shown above.
Output the array size and capacity along with the output table.

Hints

You don’t have to write functions for everything. You may just write code blocks in main, and if it makes sense for you to move any of them out of main and into functions (like a void function to cout a table of names), do so.

Would the operations be best handled with a series of if/else statements, or a case/switch statement?

There are some built-in string functions that convert to upper and lower case.

What to Submit

Submit your .cpp file and a screenshot of one run of the program that includes at least an “add” of a name and one “list” operation.

superadmin

Share
Published by
superadmin

Recent Posts

LDR 3302-21.01.01-1A24-S1, Organizational Theory and Behavior

LDR 3302-21.01.01-1A24-S1, Organizational Theory and Behavior Unit III Essay Top of Form Bottom of Form…

3 years ago

Psychology Question | My Essay Helpers

Chapter 9 What are teratogens? Give 5 examples. Define each of these stages: Germinal, embryonic,…

3 years ago

Financial Market Analysis | My Essay Helpers

You are a Financial Analyst that has been appointed to lead a team in the…

3 years ago

Decision theory | My Essay Helpers

This week’s discussion will focus on management decision-making and control in two companies, American corporation…

3 years ago

Literature Question | My Essay Helpers

Mary Rowlandson felt that the man who eventually came to own her, Quinnapin, was “the…

3 years ago