Starting from:
$21.99

$15.99

Assignment #4 Solution

Objectives:

 

The main objective of this assignment is checking the student’s ability of implementing membership functions. Please note that this assignment is split into two parts (Part-A and Part-B)

 

 

Part-­A (50 marks):

Problem description:

 

In this assignment, we will revisit Assignment #1. Therefore this assignment is an extension of Assignment #1. Add the following menu items and implement functions that take care of their respective selection:

 

1. Sorting the students based on the graduation date

 

2. Sorting the students based on GPA

 

You must use member function(s) of the corresponding struct to perform the comparison. You must use constructor(s) to initialize all data variables with default values at the beginning of the program.

 

Submission notes:

 

•    Zip all the .cpp and .h files and name it as “Assg4A_cslogin”, where the cslogin is your login ID for the computers at the Department of Computer Science at ODU.

 

•    Submit the zipped file in the respective Blackboard link.

 

 

Part-­B (50 marks):

 

 

Your task for this portion of the assignment is to choose one of these member functions which you used in part-A of this assignment to perform the comparison and make it a non-member of

the struct. You will need to make the appropriate changes accordingly. Your program should also compile and run. The user of the program should not notice any difference when running the program with any of your implementations for Part-A and Part-B of this assignment.

 

Submission notes:

 

•    Zip all the .cpp and .h files and name it as “Assg4B_cslogin”, where the cslogin is your login ID for the computers at the Department of Computer Science at ODU.

 

•    Submit the zipped file in the respective Blackboard link.

 

Sample output:

 

Sort based on graduation date:

 

 



 

Sort based on GPA:

More products