Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

only two cpp files - main.cpp & myDate.cpp CECS 282-07 (M/W)-Fall 2018 C++ for Java Programmers Program 3 - Structs and Pointers Due: Oct 15,

image text in transcribed

only two cpp files - main.cpp & myDate.cpp

CECS 282-07 (M/W)-Fall 2018 C++ for Java Programmers Program 3 - Structs and Pointers Due: Oct 15, 2018 no classes StructuneS Create student structure. A student has a name (cstring or null-terminated character fos onqlarray), Student ID (int), grade (char), birthday (myDate) and Home Town (string). Create an array of 10 students. Write a function that populates the array with 10 students. The student IDs will be randomly generated numbers between 1000 and 9999 inclusively. No two IDs can be the same. The birthdays will be random dates between Jan 1, 1995 and December 31, 2000. The grades will be random characters between A and c ariay Charactcr orray F (not including E). This will be the Original list. Create 5 arrays of pointers to students, each pointer will point to a student in your array One pointer array will be sorted so that when the pointed to contents are displayed, it shows all the students in student ID order. The other arrays will be sorted so that each displays students in age, Name, Grade or HomeTown order. The displayed list should be nicely formatted with colum should be left-justified. n names like this: All columns Name Tom Thumb Fred Flintstone Sponge Bob Student ID GradeBirthday 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 0) Display original list doesnt chare 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) hut fnchons to Sort Display list sorted by Home Town 6) Exit Note: Take advantage of your my Date 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::printDate() To help with formatting, you may want to use the library ciomanip> which includes the setw) function. CECS 282-07 (M/W)-Fall 2018 C++ for Java Programmers Program 3 - Structs and Pointers Due: Oct 15, 2018 no classes StructuneS Create student structure. A student has a name (cstring or null-terminated character fos onqlarray), Student ID (int), grade (char), birthday (myDate) and Home Town (string). Create an array of 10 students. Write a function that populates the array with 10 students. The student IDs will be randomly generated numbers between 1000 and 9999 inclusively. No two IDs can be the same. The birthdays will be random dates between Jan 1, 1995 and December 31, 2000. The grades will be random characters between A and c ariay Charactcr orray F (not including E). This will be the Original list. Create 5 arrays of pointers to students, each pointer will point to a student in your array One pointer array will be sorted so that when the pointed to contents are displayed, it shows all the students in student ID order. The other arrays will be sorted so that each displays students in age, Name, Grade or HomeTown order. The displayed list should be nicely formatted with colum should be left-justified. n names like this: All columns Name Tom Thumb Fred Flintstone Sponge Bob Student ID GradeBirthday 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 0) Display original list doesnt chare 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) hut fnchons to Sort Display list sorted by Home Town 6) Exit Note: Take advantage of your my Date 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::printDate() To help with formatting, you may want to use the library ciomanip> which includes the setw) function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions