Starting Out with C++
Starting Out with C++
8th Edition
ISBN: 9780133888201
Author: GADDIS
Publisher: PEARSON CUSTOM PUB.(CONSIGNMENT)
bartleby

Videos

Textbook Question
Book Icon
Chapter 11, Problem 12PC

Course Grade

Write a program that uses a structure to store the following data:

Member Name Description
Name Student name
Idnum Student ID number
Tests Pointer to an array of test scores
Average Average test score
Grade Course grade

The program should keep a list of test scores for a group of students. It should ask the user how many test scores there are to be and how many students there are. It should then dynamically allocate an array of structures. Each structure’s Tests member should point to a dynamically allocated array that will hold the test scores.

After the arrays have been dynamically allocated, the program should ask for the ID number and all the test scores for each student. The average test score should be calculated and stored in the average member of each structure. The course grade should be computed on the basis of the following grading scale:

Average Test Grade Course Grade
91-100 A
81-90 B
71-80 C
61-70 D
60 or below F

The course grade should then be stored in the Grade member of each structure. Once all this data is calculated, a table should be displayed on the screen listing each student’s name, ID number, average test score, and course grade.

Input Validation: Be sure all the data for each student is entered. Do not accept negative numbers for any test score.

Blurred answer
Students have asked these similar questions
Drink Machine Simulator Write a program that simulates a soft drink machine. The program should use a structure that stores the following data: Drink Name Drink Cost Number of Drinks in Machine The program should create an array of five structures. The elements should be initialized with the following data: Drink Name Cost Number in Machine Cola .75 20 Root Beer .75 20 Lemon-Lime .75 20 Grape Soda .80 20 Cream Soda .80 20 Each time the program runs, it should enter a loop that performs the following steps: A list of drinks is displayed on the screen. The user should be allowed to either quit the program or pick a drink. If the user selects a drink, he or she will next enter the amount of money that is to be inserted into the drink machine. The program should display the amount of change that would be returned, and subtract one from the number of that drink left in the machine. If the user selects a drink that has sold out, a message…
Create a structure representing a student object with the following members regno. courseid unitsRegistered: This should be an array of the course units you registered to capture marks unitsmarks: This should be an array to store the marks for the units registered. Find a way to relate the two. firstname surname address By using the structure above, write a program that populates the details of a student and compute the average, and the grade as well as the total marks. This task should be accomplished by writing functions for getData() - to populate the structure, printStudent() - to display the detail of the student, computeGrade() - to compute the grade of the student and computeMean() that computes the mean of the students: Pass the appropriate data NB: The function getData() - is a subroutine and uses structure as a reference - input, same concept to printData() Consider that your class has 10 students. Compute the class mean and standard deviation, highest class mark and lowest…
11.9: Speakers' Bureau Write a program that keeps track of a speaker's bureau. The program should use a structure to store the following data about a speaker: Name Telephone Number Speaker Topic Fee Required The program should use an array of at least 10 structures. It should let the user enter data into the array, The program should have a menu-driven user interface. Input Validation: When the data for a new speaker is entered, be sure the user enters data for all the fields. No negative amounts should be entered for a speaker's fee.

Chapter 11 Solutions

Starting Out with C++

Ch. 11.10 - Prob. 11.11CPCh. 11.10 - Write a function that uses a Rectangle structure...Ch. 11.10 - Prob. 11.13CPCh. 11.10 - Prob. 11.14CPCh. 11.10 - Prob. 11.15CPCh. 11.11 - Prob. 11.16CPCh. 11.11 - Prob. 11.17CPCh. 11.11 - Prob. 11.18CPCh. 11.11 - Prob. 11.19CPCh. 11.11 - Prob. 11.20CPCh. 11.12 - Look at the following declaration: enum Flower {...Ch. 11.12 - What will the following code display? enum {...Ch. 11.12 - Prob. 11.23CPCh. 11.12 - What will the following code display? enum Letters...Ch. 11.12 - Prob. 11.25CPCh. 11.12 - Prob. 11.26CPCh. 11 - Prob. 1RQECh. 11 - Prob. 2RQECh. 11 - Prob. 3RQECh. 11 - Look at the following structure declaration:...Ch. 11 - Look at the following structure declaration:...Ch. 11 - Look at the following code: struct PartData {...Ch. 11 - Look at the following code: struct Town { string...Ch. 11 - Look at the following code: structure Rectangle {...Ch. 11 - Prob. 9RQECh. 11 - Prob. 10RQECh. 11 - Prob. 11RQECh. 11 - Look at the following declaration: enum Person {...Ch. 11 - Prob. 13RQECh. 11 - The ______ is the name of the structure type.Ch. 11 - The variables declared inside a structure...Ch. 11 - A(n) ________ is required after the closing brace...Ch. 11 - In the definition of a structure variable, the...Ch. 11 - Prob. 18RQECh. 11 - Prob. 19RQECh. 11 - Prob. 20RQECh. 11 - Prob. 21RQECh. 11 - Prob. 22RQECh. 11 - Declare a structure named TempScale, with the...Ch. 11 - Write statements that will store the following...Ch. 11 - Write a function called showReading. It should...Ch. 11 - Write a function called findReading. It should use...Ch. 11 - Write a function called getReading, which returns...Ch. 11 - Prob. 28RQECh. 11 - Prob. 29RQECh. 11 - Prob. 30RQECh. 11 - Prob. 31RQECh. 11 - Prob. 32RQECh. 11 - Prob. 33RQECh. 11 - Look at the following statement: enum Color { RED,...Ch. 11 - A per store sells dogs, cats, birds, and hamsters....Ch. 11 - T F A semicolon is required after the closing...Ch. 11 - T F A structure declaration does not define a...Ch. 11 - T F The contents of a structure variable can be...Ch. 11 - T F Structure variables may not be initialized.Ch. 11 - Prob. 40RQECh. 11 - Prob. 41RQECh. 11 - T F The following expression refers to element 5...Ch. 11 - T F An array of structures may be initialized.Ch. 11 - Prob. 44RQECh. 11 - T F A structure member variable may be passed to a...Ch. 11 - T F An entire structure may not be passed to a...Ch. 11 - T F A function may return a structure.Ch. 11 - T F when a function returns a structure, it is...Ch. 11 - T F The indirection operator has higher precedence...Ch. 11 - Prob. 50RQECh. 11 - Prob. 51RQECh. 11 - Prob. 52RQECh. 11 - Prob. 53RQECh. 11 - Prob. 54RQECh. 11 - Prob. 55RQECh. 11 - Prob. 56RQECh. 11 - Find the Errors Each of the following...Ch. 11 - Prob. 58RQECh. 11 - struct TwoVals { int a, b; }; int main () {...Ch. 11 - #include iostream using namespace std; struct...Ch. 11 - #include iostream #include string using namespace...Ch. 11 - struct FourVals { int a, b, c, d; }; int main () {...Ch. 11 - Prob. 63RQECh. 11 - Prob. 64RQECh. 11 - Prob. 65RQECh. 11 - struct ThreeVals { int a, b, c; }; int main () {...Ch. 11 - Prob. 67RQECh. 11 - Prob. 1PCCh. 11 - Movie Profit Modify the program written for...Ch. 11 - Prob. 3PCCh. 11 - Weather Statistics Write a program that uses a...Ch. 11 - Weather Statistics Modification Modify the program...Ch. 11 - Soccer Scores Write a program that stores the...Ch. 11 - Customer Accounts Write a program that uses a...Ch. 11 - Search Function for Customer Accounts Program Add...Ch. 11 - Speakers Bureau Write a program that keeps track...Ch. 11 - Prob. 10PCCh. 11 - Prob. 11PCCh. 11 - Course Grade Write a program that uses a structure...Ch. 11 - Drink Machine Simulator Write a program that...Ch. 11 - Inventory Bins Write a program that simulates...Ch. 11 - Prob. 15PC

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Word Counter Write a program that asks the user for the name of a file. The program should display the number o...

Starting Out with Java: From Control Structures through Objects (6th Edition)

Describe the purpose of the access key attribute and how it supports accessibility.

Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)

The Do-While loop is a pretest loop.

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Graphical User Interfaces: Crash Course Computer Science #26; Author: CrashCourse;https://www.youtube.com/watch?v=XIGSJshYb90;License: Standard YouTube License, CC-BY
Python GUI | How To Make A GUI In Python | Best GUI Framework In Python | Edureka; Author: edureka!;https://www.youtube.com/watch?v=_PHJvjQJa3w;License: Standard Youtube License