Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT 5 Assignment 5 tests your knowledge of Repetition ( Chapter 5 ) in C + + . Part 1 . Design a program called

ASSIGNMENT 5
Assignment 5 tests your knowledge of Repetition (Chapter 5) in C++.
Part 1. Design a program called YourNameAssignment5(replace YourName with your actual name) that reads from a
formatted file students records (one student per line). The format of the lines from the file is the following:
Name Tests Assignments
where Name is the last name of a student (string without spaces), and Tests and Assignments are floating-point test grades
between 0 and 100, and the 3 columns are separated by tabs.
For each student, the program should compute and store in the following 3 variables (with these exact names):
TotalPoints storing the total points computed as the sum of Tests and Assignments),
NumericGrade storing the numeric grade computed as the TotalPoints divided by 2,
LetterGrade storing the letter grade of the student and computed as following: A if the numeric grade is between
90 and 100, B if the numeric grade is between 80 and 89.99, C if the numeric grade is between 70 and 79.99, D if the
numeric grade is between 60 and 69.99, and F if the numeric grade is between 0 and 59.99).
The program should also compute the number of students (lines in the file) and store it in the variable NumberStudents
and the average of the all the students numeric grades and store it in variable AverageNumericGrade.
The program should output to the console - the data read and computed from the file in this format (data should be in
the exact table columns format, with the exact header and the values from the variables; the table for STUDENT STATISTICS
should have a row for every student/line from the file; all headers and text/character columns should be aligned to the
left; all floating-point values should be aligned to the right and formatted with 2 decimals; tables do not need to have
lines/borders) :
STUDENT STATISTICS:
NAME TESTS ASSIGNMENTS TOTAL POINTS NUMERIC GRADE LETTER GRADE
Name Tests Assignments TotalPoints NumericGrade LetterGrade
CLASS STATISTICS:
STATISTIC VALUE
NUMBER NumberStudents
AVERAGE AverageNumericGrade
For example, if the file has the data from the table below with blue background, the output should be:
STUDENT STATISTICS:
NAME TESTS ASSIGNMENTS TOTAL POINTS NUMERIC GRADE LETTER GRADE
Name191.595186.593.25 A
Name285.590175.587.75 B
Name355308542.50 F
Name4958518090.00 A
Name58010018090.00 A
CLASS STATISTICS:
STATISTIC VALUE
NUMBER 5
AVERAGE 80.70
You can test your program on the attached Assignment5DataFile.txt (do edit the file or rename it), 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.
Part 2. Implement the program in Visual Studio 2022: Create a C++ project called YourNameAssignment5 and add your
code to YourNameAssignmen5 main function. Your program should be user-friendly (be well-documented/commented
(have comments for every line of code) and use only concepts learned in class so far (Chapters 1 to 5).
Part 3. Create the screenshot document for your code and output: Create a Microsoft Word document from the
YourName-Assignment.docx template and call it YourName-Assignment5.docx (replace YourName with your actual
name) Add to the document your complete screenshots of the Visual Studio editor window showing the complete C++
source code for YourNameAssignment2B program and complete screenshots of the complete output. If the entire class
C++ source code or the output does not fit in one screenshot or the screenshots cannot be easily read, create multiple
screenshots, and add multiple screenshots to the document. Please keep the screenshots in order.
Part 4. Submit your work: Submit YourName-Assignment5.docx document on eCampus under the Assignment 5. Do not
submit other types/formats of files (e.g. no CLASS, PDF, CPP, etc.). Please review the file and resubmit if not correct.

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_2

Step: 3

blur-text-image_3

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago