Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a program that will read in student's information and allow me to print a summary based on different options Specifications This program will consist of

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
a program that will read in student's information and allow me to print a summary based on different options Specifications This program will consist of two parts. The first part will read in a Students information from standard in (user entered). The second part of the program is a menu that will allow the user to interact with the students information Part 1 Ask the user for how many students are in the class . Using the Vector library create a vector of Strings to hold the students names Create a vector of type double to hold a students grade average Loop through the users input and fill in the student and grade vectors When asking the user for student info make sure to print Please enter student (First Last Grade) info: o Users input will have the following format: Tony Stark 87.6 Bruce Banner 93.5 Peter Parker 94.4 Diana Prince 100 Janet Dyne 86.3 NOTE: When storing first and last name in the vector they must be in the same element for each student. For example if I were to execute student_vector.at(e) i would get back "Tony Stark" Part 2 Print the following to the user and read in their selection Thank you for entering your students information! MacBook Air Part 2 Print the following to the user and read in their selection Thank you for entering your students Information! Please choose one of the following options: a: add a Student I remove a Student p: print the class summary I print menu q: quit program selection: a add a student Add a student to the end of the Student Vector and their grade to the end of the grade vector When asking the user for student info make sure to print Please enter student (First Last Grade) info: remove a student Ask the user for the name of the student they would like to remove When removing a student make sure that the corresponding grade is also removed from the grade vector How to use vector remove function p: Print the class summary Ola Suary Name Grade Tony Stark 87.6 MacBook Air p: Print the class summary class Summary Nane Grade Tony Stark 87.6 Bruce Banner 93.5 Peter Parker 94.4 Diana Prince 100.00 Janet Dyne 86.3 Number of Students Average Grade: 92.36 m: Print the menu Please choose one of the following options a add a Student TI remove a student po print the Summary print menu q qoit program Out the program (exit the loop) NOTE: Print Not a valid selection. If the user types something other than these options MacBook Air BO sas 44 04 NOTE: Print Not a valid selection. If the user types something other than these options You can assume Student names will be less than or equal to 20 characters in length - lomanip and set can be used to create the columns Average Grade must be printed with 2 decimal places. For example 100 must be printed as 100.00 Fixed and Set Precision can be used to accomplish this Sample Run Using input 5 Tony Stark 87.6 Bruce Banner 93.5 Peter Parker 94.4 Diana Prince 100 Janet Dyne 86.3 P 9 Output is Welcome to the student roster! How many students are in your class Please enter student (Pirot Last Grade) into Please enter student (Pirst Last Grade) into Please enter student (Pirst Last Grade) into Please enter student First Last Grade) Info Rease enter student (First lan Grade) info: Thank you for entering your students information! MacBook Air Welcome to the student roster! How many students are in your class?: Please enter student (First last Grade) Info Please enter student (First Last Grade) into Please enter student (First last Grade) info Please enter student (First Last Grade) info: Please enter student (First Last Grade) info: Thank you for entering your students information! Please choose one of the following options: a: add a student TI Temove a student p: print the class summary m: print menu q: quit program election: Class Summary Name Grade Tony Stark Bruce Banner Peter Parker Diana Prince Janet Dyne Number of Students 87.60 93.50 94.0 100.00 86.30 5 Average Grade MacBook Air BO 000 PLONSH a: add a student remove a student p: print the class summary m: print menu q: quit program selection: Class Summary Name Grade Tony Stark Bruce Banner Peter Parker Diana Prince Janet Dyne Number of Students: 87.60 93.50 94.40 100.00 86.30 5 Average Grade: 92.36 selections

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

b. Does senior management trust the team?

Answered: 1 week ago