Write a program to read the GPA of students from users and display the details using dynamic memory allocation. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Include the following member function in the Main class Member Function void display(float arr[], int size) |Description This method is used to display the student's GPA details.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 6E
icon
Related questions
Question

QUESTION GIVEN IN ATTACHMENT PLEASE SEE.

 

-----------AND PLEASE USE BELOW MAIN.CPP TEMPLATE ONLY WHILE MAKING SOLUTION-----------

 

MAIN.CPP

#include <iostream>
#include <cstring>
using namespace std;
void display(float arr[], int size) {
cout << "Students GPA Details" << endl;
//Fill your code here
}
int main() {
int num;
cout << "Enter total number of students:"<<endl;
cin >> num;
//Fill your code here
return 0;
}
Write a program to read the GPA of students from users and display the details using dynamic memory
allocation.
Strictly adhere to the Object-Oriented specifications given in the problem statement. All class
names, member variable names, and function names should be the same as specified in the problem
statement.
Include the following member function in the Main class
Member Function
void display(float arr[], int size)
Description
This method is used to display the student's GPA details.
In the main method, obtain input from the user in the console and call the display method to display the
GPA details.
Note:
Use a new keyword to create a dynamic array to store the GPA details.
Input Format:
Input consists of roll number and name.
Output Format:
The output displays the roll number and name
Refer sample input and output for formatting specifications.
[All text in bold corresponds to input and rest corresponds to output]
Sample Input and Output 1:
Enter total number of students:
2
Enter GPA of students
7.8
6.7
Students GPA Details
Student1:7.8
Student2:6.7
Transcribed Image Text:Write a program to read the GPA of students from users and display the details using dynamic memory allocation. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Include the following member function in the Main class Member Function void display(float arr[], int size) Description This method is used to display the student's GPA details. In the main method, obtain input from the user in the console and call the display method to display the GPA details. Note: Use a new keyword to create a dynamic array to store the GPA details. Input Format: Input consists of roll number and name. Output Format: The output displays the roll number and name Refer sample input and output for formatting specifications. [All text in bold corresponds to input and rest corresponds to output] Sample Input and Output 1: Enter total number of students: 2 Enter GPA of students 7.8 6.7 Students GPA Details Student1:7.8 Student2:6.7
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,