Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This needs to be done in C++ with DELETE and no use of MALLOC or FREE. Please kindly add notes throughout thank you. 5. [5

image text in transcribed

This needs to be done in C++ with DELETE and no use of MALLOC or FREE. Please kindly add notes throughout thank you.

5. [5 points] Write a program to: (a) Prompt the user to enter the number of students; (b) For each student: i. Prompt the user for the number of courses; ii. Prompt the user to enter the grade for each course. User should be given the choice to enter either letter grades or grade points. Please see the table below for letter grades and corresponding grade points; iii. Prompt the user to enter hours for each course; iv. Using the functions described below, calculate grade point average (gpa). Use the following formula for calculating gpa: Gpa=((gradePoints*hours))/(hours) In the formula above, gradePoints refers to grade points received in a course and hour refers to hours for that course. For example, for PROG1960, the hours would equal to 3 and grade points will depend on the grade received. For this program, use the following table to find grade points corresponding to a received grade: Example: if you wanted to find gpa for two courses in which grades were ' A ' and ' B ' respectively and hours were 5 and 4 respectively, the gpa would be ((4.05)+(3.04))/(5+4). The gpa should never exceed 4. Your program must use functions with the following prototypes: float Gpa(const char grades[], const int hours[], int arrLength); float Gpa(const float gradePoints[], const int hours[], int arrLength); float GradePoints(char grade)

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago