Question: (C++ Program) 1. Write a program to allow user enter an array of structures, with each structure containing the firstname, lastname and the written test

(C++ Program)

1. Write a program to allow user enter an array of structures, with each structure containing the firstname, lastname and the written test score of a driver.

- Your program should use a DYNAMIC array to make sure user has enough storage to enter the data.

- Once all the data being entered, you need to design a function to sort the data in descending order based on the test score.

- Another function should be designed to display the hightest, lowest and average test scores in all the test takers along with their name.

2. Design a class called XY. Design the class to have two private interger members X and Y.

- Provide a default constructor. Set both X and Y to be default value 0

- Provide a constructor with parameter. Initialize X and Y to be parameter values.

- Provide a copy constructor.

- Provide set and get member functions.

- Overload the + operator to enable adding of two XY instances. You are supposed to add their X part together and their Y part together.

- Overload the == operators to allow comparisons of two XY instances.

- Enable input and output of XY instance through the overloaded >> and << operators.

- You need to design a class header file, an implementation file and a driver file . The driver file needs to test out each of the member functions completely

(show output and comments)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!