Question: Please help me with this C++ program. I need to have only one display function and an array of pointers that point to students of
Create student structure with the following fields: Name (cstring or null-terminated character array) Student ID (int- unique random value between 1000 and 9999) grade (char - Values A thru F) birthday (myDate - random value: range 1/1/1998 to 12/31/2001) Home Town (string) Create an array of pointers to students of size 10. Write a function that populates the array with 10 students Write a display function that displays the contents of the array on the screen as shown below - nicely formatted and left justified. The displayed list should be nicely formatted with column names like this: All columns should be left-justified. Name Tom Thumb Fred Flintstone Sponge Bob Student ID Grade Birthday 1002 1995 2987 January 1, 1999 February 3, 1996 June 3, 1997 Home Town Small Ville Bedrock Bikini Bottom Create a menu that shows the following options: 1) Display list sorted by Name 2) Display list sorted by Student ID 3) Display list sorted by Grade 4) Display list sorted by Birthday 5) Display list sorted by Home Town 6) Exit You need to write a sorting function for each of the menu items-5 options needs 5 functions Note: Take advantage of your myDate class that you just wrote. Also, it might be helpful to create a new function that returns a string for the date format: string myDate::toString): To help with formatting, you may want to use the library siomanip> which includes the setw0 function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
