Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ solve it please Instructions: In this assignment we are going to use pointers to a certain extent (for dynamic memory allocation). First of

in c++ solve it pleaseimage text in transcribed

image text in transcribed
image text in transcribed
Instructions: In this assignment we are going to use pointers to a certain extent (for dynamic memory allocation). First of all, create a Student class (with student.h and student.cpp files) Students should have: a first name (string) a middle name (string) a last name (string) a GPA (double) Provide setters and getters for these variables. This is quite straightforward; at this point there are no pointers being utilized. In main, ask the user how many students we have for the grade processing. One the user gives you a value, you will create an array dynamically (meaning using 'new' keyword and a student pointer being used to create a new array) of that many elements. Next, for each student in the array, ask the user to provide first name, middle name, last name and GPA (this is done in a loop obviously) Afterwards, get the average of student GPA's. Print the students' information and their GPAs alongside with the average GPA. After everything, release the memory occupied by the array and let the application exit. . Example: How many students would you like to process? 2 Enter first name for Student 1 Ali Enter middle name... //after students are processed: Students: Ali Veli Demirci 2.50 Zeynep Merve Demirci 3.50 Average GPA: 3.00 Instructions: In this assignment we are going to use pointers to a certain extent (for dynamic memory allocation). First of all, create a Student class (with student.h and student.cpp files) Students should have: a first name (string) . a middle name (string) a last name (string) a GPA (double) Provide setters and getters for these variables. This is quite straightforward; at this point there are no pointers being utilized. In main, ask the user how many students we have for the grade processing. One the user gives you a value, you will create an array dynamically (meaning using 'new' keyword and a student pointer being used to create a new array) of that many elements. Next, for each student in the array, ask the user to provide first name, middle name, last name and GPA (this is done in a loop obviously) Afterwards, get the average of student GPA's. Print the students' information and their GPAS alongside with the average GPA. After everything, release the memory occupied by the array and let the annlication exit. Example: How many students would you like to process? 2 Enter first name for Student 1 Ali Enter middle name... //after students are processed: Students: Ali Veli Demirci 2.50 Zeynep Merve Demirci 3.50 Average GPA: 3.00

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions