Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please help asap That is the whole assignment... alone with what the program should give at the end Overview The purpose of this

Can you please help asap

image text in transcribedimage text in transcribedimage text in transcribed

That is the whole assignment... alone with what the program should give at the end
image text in transcribed
Overview The purpose of this lab is to give you a deeper understanding of memory management by forcing you to utilize the standard C++ heap structure as much as possible. Build a normalized student record system. Create a class to represent student data. You will also create classes to handle other specific types of data including dates and addresses. Your system will include all the necessary header files, cpp files, Makefile, and a main program to incorporate the larger system. Details Imagine a university wants to keep track of the following data about each student: First name Last name address line 1 address line 2 city state zip code date of birth month date of birth day date of birth year anticipated completion month anticipated completion day anticipated completion year gpa credit hours completed It is obvious that we will need a student class to contain all this data. However, the principles of data design indicate that the address should be its own class, as should the date. Your program should then have at least three classes: address, date, and student. Student will have two instances of date and one of address among its data members. Process Build all the classes you will need for this project. Each class should have a separate header file. This file contains only the class definition. Ensure your headers use the #ifndef structure described in lecture, and include whatever other headers they need. Build a cpp file for each class which contains the code implementation of the class. This code file will include the class header file and any other headers and libraries needed. Build a main program that imports all the needed classes and tests them. You'll then modify this program. Create a makefile to control the compilation process. The instructor will test the program by running the make utility, so be sure your makefile works. If you use a visual editor like code::blocks, you'll still need to create and test a makefile for your project. Note IDE's have tools to build make files automatically, but they are often terrible. Make your own. It's must include to include clean and run builds in your makefile along with a command to run Valgrind. Look at Andy's example for guidance on how to create it, but the command should be called valgrind. Use git to manage your versions. There is no way you can prove you used git, but learn how to use it now. It's ideal for a larger project like this with multiple files. All instances of your classes should be stored separately on the heap. That is to say, all should make use of the 'new' keyword. Your program will be tested using the Valgrind tool to ensure you have responsibly deallocated memory when your are done with it. The complete project When the classes are done, create a main program which does the following: Load up student data from a text file. All the needed information for the students should be in a text file, with each student's information on one line. We will provide you with a file with student data. There will be 50 students. The file is available here: students.date Store all instances of your classes on the heap As stated above, all instances of your custom classes should be created on the heap. Store student data on the heap Student data will be a large array, so it should be stored on the heap. Ensure you've also removed heap data when necessary. List all data for all students in a report format Create a method of the Student class to print a report about every student into a separate text file called "fullReport.txt". Create a simpler list that prints only the last and first name of each student into a separate text file called "shortReport.txt". (optional) Output a list of student names in alphabetical order Print the list in alphabetical order into a separate text file called "alphaReport.txt". You can use your own sort algorithm, or the one from std::sort for this. You can consider this a blackbelt requirement, so wait until you get other things done before adding this. Note: You may not use any pre-constructed classes from the c++ standard template library (vectors, sets, etc). You MAY construct your own (if you reallllly wanna go there). Additionally, any instances of the classes you write need to be stored separately on the heap by utilizing the keyword new. Your program needs to test for memory leaks using Valgrind. We won't use your valgrind file, but the program will be tested for memory leaks so check your Valgrind Use C++98 for the base assignment, smart pointers and other features of C++11 are great, but they are not the point of the assignment. Use them in the blackbelt or future classes. Use a standard c array not a vector in this program. Here is the format you may use for a line of student data in your text file: Surname, GivenName, StreetAddress,Address2, City State ZipCode, Birthday,Graduation, GPA, Credit Hours Complete Note that the text file provided by your recitation leader might be slightly different. Use the data you're given. Here is an example of what it may look like: Fry, Lock, 123 Hillside Drive,,North Brunswick, NJ,57237,08/22/1970,05/15/2012,4.00,90 Note that the text file provided by your recitation leader might be slightly different. Use the data you're given. Here is an example of what it may look like: Fry, Lock,123 Hillside Drive,, North Brunswick, NJ,57237,08/22/1970,05/15/2012,4.00,90 Overview The purpose of this lab is to give you a deeper understanding of memory management by forcing you to utilize the standard C++ heap structure as much as possible. Build a normalized student record system. Create a class to represent student data. You will also create classes to handle other specific types of data including dates and addresses. Your system will include all the necessary header files, cpp files, Makefile, and a main program to incorporate the larger system. Details Imagine a university wants to keep track of the following data about each student: First name Last name address line 1 address line 2 city state zip code date of birth month date of birth day date of birth year anticipated completion month anticipated completion day anticipated completion year gpa credit hours completed It is obvious that we will need a student class to contain all this data. However, the principles of data design indicate that the address should be its own class, as should the date. Your program should then have at least three classes: address, date, and student. Student will have two instances of date and one of address among its data members. Process Build all the classes you will need for this project. Each class should have a separate header file. This file contains only the class definition. Ensure your headers use the #ifndef structure described in lecture, and include whatever other headers they need. Build a cpp file for each class which contains the code implementation of the class. This code file will include the class header file and any other headers and libraries needed. Build a main program that imports all the needed classes and tests them. You'll then modify this program. Create a makefile to control the compilation process. The instructor will test the program by running the make utility, so be sure your makefile works. If you use a visual editor like code::blocks, you'll still need to create and test a makefile for your project. Note IDE's have tools to build make files automatically, but they are often terrible. Make your own. It's must include to include clean and run builds in your makefile along with a command to run Valgrind. Look at Andy's example for guidance on how to create it, but the command should be called valgrind. Use git to manage your versions. There is no way you can prove you used git, but learn how to use it now. It's ideal for a larger project like this with multiple files. All instances of your classes should be stored separately on the heap. That is to say, all should make use of the 'new' keyword. Your program will be tested using the Valgrind tool to ensure you have responsibly deallocated memory when your are done with it. The complete project When the classes are done, create a main program which does the following: Load up student data from a text file. All the needed information for the students should be in a text file, with each student's information on one line. We will provide you with a file with student data. There will be 50 students. The file is available here: students.date Store all instances of your classes on the heap As stated above, all instances of your custom classes should be created on the heap. Store student data on the heap Student data will be a large array, so it should be stored on the heap. Ensure you've also removed heap data when necessary. List all data for all students in a report format Create a method of the Student class to print a report about every student into a separate text file called "fullReport.txt". Create a simpler list that prints only the last and first name of each student into a separate text file called "shortReport.txt". (optional) Output a list of student names in alphabetical order Print the list in alphabetical order into a separate text file called "alphaReport.txt". You can use your own sort algorithm, or the one from std::sort for this. You can consider this a blackbelt requirement, so wait until you get other things done before adding this. Note: You may not use any pre-constructed classes from the c++ standard template library (vectors, sets, etc). You MAY construct your own (if you reallllly wanna go there). Additionally, any instances of the classes you write need to be stored separately on the heap by utilizing the keyword new. Your program needs to test for memory leaks using Valgrind. We won't use your valgrind file, but the program will be tested for memory leaks so check your Valgrind Use C++98 for the base assignment, smart pointers and other features of C++11 are great, but they are not the point of the assignment. Use them in the blackbelt or future classes. Use a standard c array not a vector in this program. Here is the format you may use for a line of student data in your text file: Surname, GivenName, StreetAddress,Address2, City State ZipCode, Birthday,Graduation, GPA, Credit Hours Complete Note that the text file provided by your recitation leader might be slightly different. Use the data you're given. Here is an example of what it may look like: Fry, Lock, 123 Hillside Drive,,North Brunswick, NJ,57237,08/22/1970,05/15/2012,4.00,90 Note that the text file provided by your recitation leader might be slightly different. Use the data you're given. Here is an example of what it may look like: Fry, Lock,123 Hillside Drive,, North Brunswick, NJ,57237,08/22/1970,05/15/2012,4.00,90

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

International Baccalaureate Computer Science HL And SL Option A Databases Part I Basic Concepts

Authors: H Sarah Shakibi PhD

1st Edition

1542457084, 978-1542457088

More Books

Students also viewed these Databases questions

Question

Presentation Aids Practicing Your Speech?

Answered: 1 week ago