Write a program in C++ to help a teacher to automate her grading system. Your program will have the following: 1 - A struct named studentInfo with the following members:  • firstName, variable of type string  • lastName, variable of type string  • ID, variable of type string   2 - A struct named courseGrade with the following members:  •  total, variable of type int  •  Final, variable of type int  •  sum, variable of type int   3- A struct named student with the following members:  • info, variable of type studentInfo  •  grade, variable of type courseGrade  •  status, variable of type bool

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

Write a program in C++ to help a teacher to automate her grading system. Your program will have the following:

1 - A struct named studentInfo with the following members:

 • firstName, variable of type string

 • lastName, variable of type string

 • ID, variable of type string

 

2 - A struct named courseGrade with the following members:

 •  total, variable of type int

 •  Final, variable of type int

 •  sum, variable of type int

 

3- A struct named student with the following members:

 • info, variable of type studentInfo

 •  grade, variable of type courseGrade

 •  status, variable of type bool

 

4 - A function inputData to prompt the user to enter the information of the student. The function accepts one parameter of type student.

 

5 - A function computeSum to compute and set the total of all grades (total+final). The function accepts one parameter of type courseGrade.

 

6 - A function setStatus to set the status of the course. If the sum>=50 then, the student passed the course else, the student failed. The function accepts one parameter of type student.

7- A function print to print all information of the class student. The function accepts one parameter of type array of student.

 

8 - Your main should perform the following:

 • Declare an array std of type student. Use size 3.

 • Fill the information of the std array by calling inputData Function

 • Call  computeSum Function for all elements of the std array

 • Call setStatus Function for all elements of the std array

 • Call print Function for all elements of the std array

Constraints

None

Input Format

The input will be as following: 

First name, last name, ID, total of 60 and final grade 

Output Format

As in the sample

Sample #1

Input

Omar Khaled 12345 40 20 

Sara Ali 12346 55 35 

Rashed Kamal 12347 20 15

Output

Omar Khaled 12345 60 Pass 

Sara Ali 12346 90 Pass 

Rashed Kamal 12347 35 Fail

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
ADT and Class
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education