Write a c++program that: Define a class student with the following fields: a. string First name b. string Last name c. int ID d. int Number of courses enrolled in e. Dynamic array of courses (taken and currently enrolled in): String         *courses f. Dynamic array of grades: int* grades g. string Address h. double Registration fees i. int Total number of credits

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter9: Working With Text Functions And Creating Custom Formats
Section: Chapter Questions
Problem 2.7CP
icon
Related questions
Question

Write a c++program that:

Define a class student with the following fields:
a. string First name
b. string Last name
c. int ID
d. int Number of courses enrolled in
e. Dynamic array of courses (taken and currently enrolled in): String         *courses
f. Dynamic array of grades: int* grades
g. string Address
h. double Registration fees
i. int Total number of credits
j. int Expected Graduation term.

Declare an array of four students. Perform the following operations using your declared array:

a. Open the provided file input.txt. Fill the array by reading values from the specified input file. Make sure that the array of courses and array of grades are initialized properly and destroyed properly as well.
b. Call a function that prints student information in a well-organized table like fashion.
c. Call a function that compares average between two students.
d. Call a function that prints student names based on their GPA from highest to lowest. (hint you need to sort the array of students).
e. Call a function that prints student names from lowest GPA to highest.
f. Call a function that gives a flat raise of 10 points to all students in one of the subject matters.
g. Call a function that gives a raise based on the highest student grade. This means that the highest student grade should be adjusted to 100 and the rest of the students will get new_student_grade = (100*original_student_grade)/highest_student_grade.

File Edit
Format View Help
Fatima AlAli 20190000 3 CMPS210 CMPS220 ENGL203 85 88 80 Sarafand Lebanon 4500000 33 2022
Zahraa AlHassan 20180101
4 CMPS282 CMPS220 MATH202 MATH210 80 83 78 90 Nabatiyeh Lebanon 6000000 60 2021
Karim Sadek 20180010 3 ENG210 ENG220 ENGL204 82 71 77 Jieh Lebanon 4500000 38 2022
Hadi Ibrahim 20170122 4 ENG282 ENG220 MATH204 MATH211 79 81 77 80 Beirut Lebanon 6000000 59 2021
Transcribed Image Text:File Edit Format View Help Fatima AlAli 20190000 3 CMPS210 CMPS220 ENGL203 85 88 80 Sarafand Lebanon 4500000 33 2022 Zahraa AlHassan 20180101 4 CMPS282 CMPS220 MATH202 MATH210 80 83 78 90 Nabatiyeh Lebanon 6000000 60 2021 Karim Sadek 20180010 3 ENG210 ENG220 ENGL204 82 71 77 Jieh Lebanon 4500000 38 2022 Hadi Ibrahim 20170122 4 ENG282 ENG220 MATH204 MATH211 79 81 77 80 Beirut Lebanon 6000000 59 2021
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage