Problem 1 (30 points) A. Write a funciton called sum_part, which has four parameters. The first parameter is an array of integers, the second parameter is the size of the array, the third and fourth parameters are index positions in the array. The function should return the sum of the numbers from the first index position to the second index position given as parameters. In other words, suppose the array looks like this. |---|---|---|---|---|---|---|---|---|---| | 2 | 5 | 4 | 7 | 1 | 3 | 4 | 2 | 5 | 6 | |---|---|---|---|---|---|---|---|---|---| 0 1 2 3 4 5 6 7 8 9 And suppose that the index positions given as the third and fourth parameters are 4 and 7. Then the function should return 10, since the sum of the numbers in index position 4 though index position 7 is 10. [Don't worry about checking for errors in this function. Assume the index positions make sense.] B. Write a program that reads in (from the terminal) the number of people who got each grade for an exam (how many people got 0, how many people got 1, ..., how many people got 100), stores the information in an array, and then prints a message indicating the number of people who got B (80-89) on the exam. Your program must use the function from part A. ------------------------------------------------------------------------------ Problem 2 (20 points): Write a function called more that takes a string as parameter. The function should return true if the first character of the string appears more than once in the string. For example, the function would return true for the string "garage", because 'g' appears more than once, but it would return false for "there" because 't' only appears once." [You can assume the string is made up of only lower case letters.] ------------------------------------------------------------------------------ Problem 3 (20 points): Write a function called copypos that takes an input stream and an output stream as parameter. Assume that the input stream is already associated with a file of integers. The function should make the file associated with the output stream contain only the positive numbers in the input file, each written on a separate line. [Assume both streams are already associated with a file. You do not need to open or close any files.] ------------------------------------------------------------------------------ Problem 4 (30 points): A. Write a class called university which has a data field for the name of the university, a data field for the number of female students at the university, and a data field for the number of male students at the university. [As usual, data fields must be private.] Also, give the prototype for the function in part B of this question. B. Write a member function for university, called num_students which returns the total number of students at the university. [Member functions are public.] C. Write a non-member function called more_students which takes two universities as parameters and returns true if the first university has more students than the second. Otherwise return false. [Use function from part B.] ------------------------------------------------------------------------------