c programming 70

We're the ideal place for homework help. If you are looking for affordable, custom-written, high-quality and non-plagiarized papers, your student life just became easier with us. Click either of the buttons below to place your order.


Order a Similar Paper Order a Different Paper

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):

Array size: 0, capacity: 2_x000D_
MENU_x000D_
A Add a student_x000D_
D Delete a student_x000D_
L List all students_x000D_
Q Quit_x000D_
...your choice: <strong>a[ENTER]</strong>_x000D_
_x000D_
Enter the student name to add: <strong>Jonas-Gunnar Iversen[ENTER]_x000D_
</strong><strong>_x000D_
</strong>Array size: 1, capacity: 2_x000D_
MENU_x000D_
A Add a student_x000D_
D Delete a student_x000D_
L List all students_x000D_
Q Quit_x000D_
...your choice: <strong>a[ENTER]</strong>_x000D_
_x000D_
Enter the student name to add: <strong>Marcela Nogueira[ENTER]_x000D_
</strong>_x000D_
Array size: 2, capacity: 2_x000D_
MENU_x000D_
A Add a student_x000D_
D Delete a student_x000D_
L List all students_x000D_
Q Quit_x000D_
...your choice: <strong>l[ENTER]</strong>_x000D_
_x000D_
Student Roster_x000D_
--------------_x000D_
Jonas-Gunnar Iversen_x000D_
Marcela Nogueira_x000D_
_x000D_
Array size: 2, capacity: 2_x000D_
MENU_x000D_
A Add a student_x000D_
D Delete a student_x000D_
L List all students_x000D_
Q Quit_x000D_
...your choice: <strong>d[ENTER]_x000D_
</strong>Enter the student name to delete: <strong>Jonas-Gunnar Iversen[ENTER]</strong>_x000D_
_x000D_
Array size: 1, capacity: 2_x000D_
MENU_x000D_
A Add a student_x000D_
D Delete a student_x000D_
L List all students_x000D_
Q Quit_x000D_
...your choice: <strong>q[ENTER]</strong>

Requirements

  1. Allow the menu options to be entered in either lower or upper case.
  2. Implement all the actions in the above menu — add, delete and list.
  3. Use a dynamic array of strings to store the roster, with an initial capacity of 2.
  4. 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.
  5. The output table should have a column heading as shown above.
  6. 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.

Writerbay.net

Do you need academic writing help? Our quality writers are here 24/7, every day of the year, ready to support you! Instantly chat with a customer support representative in the chat on the bottom right corner, send us a WhatsApp message or click either of the buttons below to submit your paper instructions to the writing team.


Order a Similar Paper Order a Different Paper
Writerbay.net