Problem Solving with C++ plus MyProgrammingLab with Pearson eText-- Access Card Package (9th Edition)
Problem Solving with C++ plus MyProgrammingLab with Pearson eText-- Access Card Package (9th Edition)
9th Edition
ISBN: 9780133862218
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 18, Problem 3PP
Program Plan Intro

Students Records

Program Plan:

  • Include required header file.
  • Include required “std” namespace.
  • Define a structure for “StudentInfo”.
    • Declare variable for student name and grade.
  • Define the function for student records order.
  • Define main function
    • Declare variable “stud” in “vector” template class.
    • Create an object for student structure “StudentInfo”.
    • Declare and initializes the required variable.
    • Performs “do-while” loop. This loop executes until the option is not equal to “y” or “Y”.
      • Read the student name from user.
      • Read the student grade from user.
      • Then push the student name and their grade into vector using “push_back()” function.
      • Read the again option from user.
    • Then store the maximum size for student name.
    • Display the student records using “for” loop.
    • Then compute the maximum and minimum grade and after that compute the grade average.
    • Display the maximum, minimum and average grade.
    • Sort the names in student records using “sort” function.
    • Finally display the student names and their grades after sorting.

Blurred answer
Students have asked these similar questions
Using R language
Using R language
Using R language
Knowledge Booster
Background pattern image
Computer Science
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.
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr