Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

grades.txt file: The program needs to use loops/repetition statements to read the data from the files and selection statements (Chapter 4) to compute the letter

image text in transcribed

grades.txt file:

image text in transcribed

The program needs to use loops/repetition statements to read the data from the files and selection statements (Chapter 4) to compute the letter grades.

You should write the program in Visual Studio 2019 using only concepts learned in class so far (Chapters 1 to 5, so, without arrays, functions, pointers, references, and any other concepts not studied in class so far).

195 90 95 100 90 90.5 Blake 1255 C 155 Dang 195 Engberg 30 Fans 155 Garda 1936 125 Ionescu 109 Johnson 125 KO 75 Lagos 555 Mikh 195 Nguy ). 19 195 ONeil las Student Total Name Anderson 186 090.25A 165.50 8.75 8 CE 85.00 F 180.000.00A Engberg 180.00 20.00 A 145.00 72.50 Garcia 14.10.05A Hadad 85.00 OF Toneses 195.50 97425 A Johnson 165.00 22:50 KAD 160.00 30.00 B Lagos 135 3067.75D Michalo12329.5 B HNH 195.009250 GA ON ! 77.50 95.5 90 BS 180 18 BS 100 20 ASSIGNMENT 2 Assignment 2 tests your knowledge of Selection (Chapter 4) and Repetition (Chapter 5). Write a program YourName-Assignment2 (replace Your Name with your actual name, no spaces) that reads/inputs from a file students' records (one student per line) with the following format: Last Name Tests Grade Assignments Grade Sample console output: and computes and outputs (to the console) the STUDENT Sample input from data file: STUDENT STATISTICS: STATISTICS in a table format one line per student: Numeric Letter Student Name Total Points Numeric Grade Letter Grade Paints Grade Grade Anderson915 The table should have the exact table header The program should also compute and output (to the console) in Dang the 2 rows 2 columns table format, the CLASS STATISTICS for the entire class: the number of students (row Number) and the average numeric grade (row Average) among all students. All text/character columns should have the same width, be aligned to the left and all floating-point values align to the right and formatted with 2 decimals. 155.00 CLASS STATISTICS You can test your program on the attached Grades.txt (do not Numbers edit the file) and you can check your output by comparing it to the sample output shown here, but your program should work on any other files that have the correct format, thus, do not hardcode the output or the number of students. The program needs to use loops/repetition statements to read the data from the files and selection statements (Chapter 4) to compute the letter grades. You should write the program in Visual Studio 2019 using only concepts learned in class so far (Chapters 1 to 5, so, without arrays, functions, pointers, references, and any other concepts not studied in class so far). Create a Microsoft Word document called Your Name-Assignment2-Screenshots.docx (replace Your Name with your name, no spaces) that contains screenshots of your entire C++ code in editor (take multiple screenshots if the code is larger than one screen and is not readable in one screenshot), and the entire program console output in the Console Output Window for the attached Grades.txt (take multiple screenshots if the output is larger than one window). SUBMIT your Your Name-Assignment2.cpp Visual Studio 2019 C++ source code and YourName-Assignment2- Screeshots.docx screenshots document files under Assignment2 on eCampus. Do not archive the files (no ZIP, RAR or other archived files) or submit other file formats. AD2985 The program should work on any file with that format with different numbers of line. Do not hardcode the number of lines, compute it instead when you read from the file. ? You compute the total points as the sum between Tests and Assignments. * You compute the Numeric Grade as the total points (from all the evaluations) divided by 2. The value will be between 0 and 100 The Letter Grade is: A if the numeric grade is between 89.5 and 100, B if the numeric grade is between 79.5 and 89.49, C if the numeric grade is between 69.5 and 79.49, D if the numeric grade is between 59.5 and 69.49, and F if the numeric grade is between O and 59.49. The table header should have the exact text, but it does not have to be on 2 separate lines/rows, you can put them on one row (.e.g. "Total Points" on one row) 6 The number of lines from the file The sum of all the numeric grades divided by the number of students 2 95 Anderson Blake 75.5 Cheg 0 Dang 95 Engberg 80 Farris 55 Garcia 93.6 Hadad 65 Ionescu 100 Johnson 75 Kaloo 75 Lagos 55.5 Mikhailov Nguyen 95 O'Neil 85 91.5 90 0 85 100 90 90.5 60 95.5 90 85 80 75 100 70 83.5

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

121. If X is uniformly distributed on [1, 3], find the pdf of Y X2.

Answered: 1 week ago