Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ please For this homework assignment you are to read a text file containing student information and their grade for the current semester and check

c++ please

image text in transcribed

For this homework assignment you are to read a text file containing student information and their grade for the current semester and check whether they are failing all courses (3 total). You are to declare 3 structures called Name, Grades, and Studentinfo respectively. The structure Name contains two char arrays containing a student's first and last name. The structure Grades contains 3 chars that hold the grades for three classes the student is taking: math, science, and English. The last structure Studentinfo contains 3 datatypes: an int for student ID, a Name, and Grades. The structure Studentinfo will hold all the information needed for the student. In main, you're to create an array of the structure Studentinfo that can hold as many students as there are in the file Studentinfo.txt. You'll open the file in main (be sure to check if it is opened!) and call the function ReadFile to read the contents of the fle and store them appropriately in the structure array before returning to main. Once the student info is read and stored, main will call the function IsFailing and check which students are failing all the classes. Main's job is to simply open the file, call the ReadFile and IsFailing functions. ReadFile will take as argument the file to read, the Studentinfo structure array, and the number of students. It will store all the information from the text file into the structure. Note: this function returns nothing. IsFailing will take as argument the Studentinfo structure array and the number of students. It will check each student who is failing all three courses. If a student is failing all three courses, it will call DispName to display the name of the student who is failing. If there are no students who are failing, then a message will be printed to the output screen that no students are currently failing. Note: this function returns nothing. DispName will take as argument a Studentinfo structure and display the first and last name to the output screen, Note: this function returns nothing A sample run is as follows: The following student(s) are failing: Sina Schran Wesley Fontanez Syreeta Silverstein Another sample run is as follows The following student(s) are foiling: No students are failing! To help you get started,I went ahead and created a HW14 subdirectory for you and put starter kit in there called SemesterGrade.tar.gz. This is a compressed archive file, much like a zip file, it contains files that need to be extracted. To extract the files, use this command tar xvzf SemesterGrade.tar.gz This will extract the files contained within the archive into the present working directory. You should then find a text file that contains the student info. NOTE: You only need to extract the files once! If you extract the cpp file, write some code, and then extract again at a later point in time, the original cpp file in the archive will be extracted and overwrite any code that you've already written

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago