Write a program that inputs, processes, and outputs a set of student records organized as a vector of structure StudentRec objects. write a program where each student record is a structure that looks like this: struct StudentRec { string last_name = "";          // Last name string first_name = "";         // First name int year_grad = 0;                  // Year expected to graduate float gpa = 0.0;                       // Current gpa

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 12RQ
icon
Related questions
Question

Write a program that inputs, processes, and outputs a set of student records organized as a vector of structure StudentRec objects.

  • write a program where each student record is a structure that looks like this:

struct StudentRec

{

string last_name = "";          // Last name

string first_name = "";         // First name

int year_grad = 0;                  // Year expected to graduate

float gpa = 0.0;                       // Current gpa

}

 

  • The program should ask for the data to fill a studentRec of structure StudentRec and then ask y/n if they want to add another studentRec.
    • Each studentRec will go into the vector of type StudentRec called student_list.
  • After the student records have been entered into the vector student_list, find the average gpa of all the students in the vector.
  • Output all the student records and give the average gpa for the students. Use the iomanip tools to make the data look as nice a possible.
  • Write excellent comments:
    • Critical or tricky parts that might be difficult to understand without a comment.

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT