Program that print a grade report for students

Assignment Help Programming Languages
Reference no: EM131393931

PROJECT

The program will print a grade report for students in a course.

Input: An instructor has a class of no more than 40 students each of whom takes 6 tests. For each student in the class, there is one line in the input file. The line contains the student's first name (no more than 10 characters), last name (no more than 12 characters), ID# (a string of 6 characters) and 6 integer test scores. Input text file should be named student_input.dat

Example of file input:

Adam Zeller 452313 78 86 91 64 90 76

Barbara Young 274253 88 77 91 66 82 93

Carl Wilson 112235 87 99 76 93 95 94

Note that a different file will be used for testing. Also note that amount of blank spaces between names, ID, and grades can be arbitrary, i.e., any number. There will be at least one space though. There might be a space between the last grade and the invisible symbol that signifies the end of the line '/n'. Total amount of characters for each line will not exceed 256, including the end of the line symbol.

Processing: The program is to read the input file and calculate each student's average and letter grade for the course. The average is calculated by dropping the student's lowest test score and then averaging the remaining 5 scores. In addition, the number of students receiving each letter grade (A, B, C, D, or F ) for the course is to be calculated. The cutoff for the letter grades is 89.5 for an A, 79.5 for a B, 69.5 for a C, 59.5 for a D.

Output: The program is to print to an output file (student_results.dat) a table showing each student's name (Last, First), identification number, course average (rounded to 1 decimal place), and letter grade. Following the last student, a summary of the number of students receiving each letter grade is to be printed. All output should be clearly labeled and easy to read. The output file should have a meaningful heading at the top of the file.

NOTES:

The program must be modular, with significant work done by functions. Each function should perform a single, well-defined task. When possible, create re-usable functions. Do not write trivial functions such as a function to read a single value from an input file.

You must name your C++ source file prog02_xxxxxx.cpp where xxxxxx is your TXstate id number.

The input file must be named student_input.dat

The spacing in the input file can be arbitrary, i.e.,

The output file must be named student_results.dat

You must have at least three functions: for example these functions might be 1) function that "drops" the lowest grade (i.e., would allow subsequent function to exclude the lowest grade from the subsequent computation of the average), 2) function that calculates the average, and 3) function that converts the average to the letter grade. You can select to create other functions to meet the limit of three.

Use character arrays and c-strings (#include <cstring>) for converting text to integers. You cannot use string objects and any methods that are included in <string> library, i.e, you cannot use #include <string> in your code. Otherwise you are going to be penalized.

You cannot use stream operator ">>" to read information from the file! Please use as getline() and c-string functions we discussed in class to read the data from the file. You can use stream operator to put information back into the file.

You program must detect and correct following problems in the input file

  • Negative grade present - display an error and terminate the program
  • Less than 6 grades exist (minimum of 5 will be provided) - display a warning in the console, but continue the execution of the program. Calculate the average and the letter grade based on the existing grades, but in this case do not discard the lowest grade.

Reference no: EM131393931

Questions Cloud

What is jumbo juice’s cost of preferred stock : If the firm issues 10,000 shares of preferred stock at $50 per share, how much of the total value of the issue will the firm be able to use (receive)?
Discuss about the post given below : Provide a clear and concise background of the case, showing a holistic view of the client.Problem Identification: Provide an analysis of the main issues in the case. Clearly connect how issues and needs presented by the client are affecting his em..
What is its cost of issuing preferred stock : What is its cost of issuing preferred stock? The firm's marginal tax rate is 34 percent.
Define copyright trade secrecy as they relate to software : Define copyright, trade secrecy, and patents as they relate to software. The owner of a copyright has five principle rights. What are they?
Program that print a grade report for students : The program will print a grade report for students in a course. he program is to read the input file and calculate each student's average and letter grade for the course. The average is calculated by dropping the student's lowest test score and the..
Write a response about the given post : The article that the learner selected that addresses a real-world the problem is residential care placement of young children in rural areas. The concern is that these children should be in foster homes instead they are not receiving adequate trea..
What is global''s after-tax cost of debt : Global Products plans to issue long-term bonds to raise funds to finance its growth. The company has existing bonds outstanding that are similar to the new bonds it expects to issue.
Describe the advantages and disadvantages of each method : Describe the use of internal rate of return (IRR), net present value (NPV), and the payback method in evaluating project cash flows. Describe the advantages and disadvantages of each method.
Explain the theoretical perspectives and empirical findings : PSY620 : In your paper, use your research to provide an explanation of each of the above listed discipline-based constructs. Apply ethical principles to the explanations of each construct and consider the issues that arise in research within these..

Reviews

len1393931

2/14/2017 4:37:47 AM

The program must be modular, with significant work done by functions. Each function should perform a single, well-defined task. When possible, create re-usable functions. Do not write trivial functions such as a function to read a single value from an input file. You must have at least three functions: for example these functions might be 1) function that "drops" the lowest grade (i.e., would allow subsequent function to exclude the lowest grade from the subsequent computation of the average), 2) function that calculates the average, and 3) function that converts the average to the letter grade. You can select to create other functions to meet the limit of three.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd