Question: I have provided the code and guidelines as well. Please complete the code using a conpiler and also share the results please. thank you. Using
I have provided the code and guidelines as well. Please complete the code using a conpiler and also share the results please. thank you.




![void getinput(Student [], const int); int modify(int); void display(const Student [], const](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2f2cc86e9a_90066f2f2cc1cb89.jpg)
Using class separation, implement a Student class according to the following UML diagram: The implementation details should be straightforward. For the constructor, make it display the message Student object created!. For the destructor, make it display the message Student object destroyed!. \#include "Student.hpp" /*kikibjoknkwkindikitakiki * Function prototypes void getinput(Student [], const int); int modify(int); void display(const Student [], const int); * Input: * N/A * * Output: * An integer to signal to the os the exit code. int main() \{ // variables const int SIZE =5; Student objArray[SIZE]; // get input from the user getInput (objArray, SIZE); I/ modify the ages for certain students II uses a range-based for loop with a reference variable for (Student\& s : objArray) \& s. setAge(modify(s.getAge())); 3 II display the modified information back to the user display(objArray, SIZE); II terminate return : 3 * Description: * Uses a 'for' loop to prompt the user for the name/age of each student. Store. * the information in the appropriate object. * Input: * objArray - an array of 'Student' objects * SIZE - a constant integer that represents the size of the array. * * Output: * N/A void getInput(Student objArray[], const int SIZE) \& II temporary variables int t=0; string s=; 1/ for each student for (int 1=0;i50){ i=50; 3 I/ return the modified age return i; 3 * Description: * Uses a "while loop to display the information about the students stored in * the object array. * * Input: * objArray - an array of 'Student' objects * SIZE - a constant integer that represents the size of the array * Output: * N/A The following is a sample run of my solution. You can use this as a model to aim for with your program. Student object created! Student object created! Student object created! Student object created! Student object created! Enter the name for student \#1: Patricia Perez Enter the age for student \#1: 29 Enter the name for student \#2: Carmen Enter the age for student \#2: 23 Enter the name for student \#3: Albert DeLeon Enter the age for student \#3: 16 Enter the name for student \#4: Brandon W Perry Enter the age for student \#4: 54 Enter the name for student \#5: Nicole Henderson Enter the age for student \#5: 30 Student \#1 Name: Patricia Perez Age: 29 Student \#2 Name: Carmen Age: 23 Student \#3 Name: Albert DeLeon Age: 18 Student \#4 Name: Brandon W Perry Age: 50 Student #5 Name: Nicole Henderson Age: 30 Student \#5 Name: Nicole Henderson Age: 30 Student object destroyed! Student object destroyed! Student object destroyed! Student object destroyed! Student object destroyed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
