Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab6.cpp Write a program that dynamically allocates an array of integers and an array of strings based on the user's input size. The arrays will

image text in transcribed
Lab6.cpp Write a program that dynamically allocates an array of integers and an array of strings based on the user's input size. The arrays will store students' names and test scores. -In your main0 function prompt the user to enter the size of the arrays followed by the arrays elements as name-score pairs. - The arrays should be passed to the function dynamicSort0 that will sort the two arrays based on the integers array, check sorting algorithms slides (last two slides for hints). When the sorted list of scores is displayed, each student's name should be displayed along with his or her score Display the arrays Another function should be called, dynamicAverage), that calculates the average after dropping the lowest score. Remember, the scores array is already sorted isplay the average Notes: - Input validation: Do not accept negative numbers for test scores. Sample output: How many test scores will you enter? 3 Enter student 1's last name: h Enter that student's test score: 90 Enter student 2's last name: d Enter that student 's test score: 80 Enter student 3's last name: j Enter that student's test score: 75 The test scores in ascending order, and their average, are: Name Score 75.00 80.00 90.00 Average score: 81.67

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

Students also viewed these Databases questions