Create a program to compute numeric grades for a course

Assignment Help Computer Engineering
Reference no: EM1334462

You can add in to the program I made below. It is incomplete but you can use it so that you would have a quicker time to complete the program. Step by step explanations would help me since I am an online learner. The question is as follows:

Write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's last name, then one space, then the student's first name, then one space, then ten quiz scores all on one line. The quiz scores are whole numbers and are separated by one space. Your program will take its input from this file and send its output to a second file. The data in the output file will be the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

// Class average program with counter-controlled repetition

#include <iostream>

using std::cout;
using std::cin;
using std::end1;

const int MAX_GRADES = 10
// function main begins program execution
int main()
{
int total; // sum of grades input by user
int gradeCounter; // number of grade to be entered next
int grade; // grade value
int average; // average of grades

// initialization phase
total = 0; // initialize total
gradeCounter = 0; // initialize loop counter

// processing phase
while (gradeCounter<MAX_GRADES)
{ // loop MAX_GRADES times
cout << "Enter grade:"; // prompt for input
cin >> grade; // read grade from user
total = total + grade; // add grade to total
gradeCounter = gradeCounter + 1; // increment counter
}

// termination phase
average = total / MAX_GRADES; // integer division

// display result
cout << "Class average is " << average;
return 0; // indicate program
} // end function main

Reference no: EM1334462

Questions Cloud

The optimal strategy : With today's strain on revenue and cash flow, external auditors are getting squeezed to lower their fees. And they have to in order to keep business.  What do you think would be the optimal strategy?
Compute the value of the price index for gdp : Compute the value of the price index for GDP for 2006 using 2005 as the base year. By what percent did prices increase.
Show the value of understanding job analysis information : Value of understanding job analysis information - What is the value of understanding job analysis information as an operating manager?
Develop a linear programming model : The company has 1500 units of foam backing available for use. Develop a linear programming model for this problem. What is the objective function of this linear problem?
Create a program to compute numeric grades for a course : Write down a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's last name, then one space, then the ..
By how much has the franc enchanced or depreciated : By how much has the Franc enchanced or depreciated against the dollar.
Answer to healthcare : Of the various organization theories that you studied, which is most appropriate for health systems and why and Under what conditions would vertical integration be an appropriate model, and why?
Analyze the outputs of green mountain coffee roasters : Analyze the outputs of Green Mountain Coffee Roasters using the Nadler-Tushman Congruence Model.
Develop a staffing plan for a new call center : Developing a staffing plan for a new call center - Determine how many people you need to hire and in what functional areas

Reviews

Write a Review

Computer Engineering Questions & Answers

  Problems on word processing application

Problems on word processing application

  Providing access to the user

Explain the other questions you would ask? Will you think of any other ways to estimate this? How will you verify that the user requires this access?

  Purpose and use of the java adapter classes

Purpose and use of the Java Adapter classes

  Suppose cookies are not disabled on the client

suppose cookies are not disabled on the client.

  Write down a concise summary

Write down a concise summary of what you have learned about physical tamper-resistant devices.

  Write java program that can serve as simple calculator

Write down a Java program that can serve as a simple calculator. This calculator keeps track of a single number (of type double) that is called result and that starts out as 0.0.

  How to prepare an implementation plan

Boardman Management Group manages the Baderman Island resort. They are considering whether to upgrade the word processing software recent in use at the resort or to buy a new word processing software application. Boardman plans to hire Smith Syste..

  Write down program using c language programming

Write down program using C language programming.

  Explain the concept of scalability to the team

The project leader wants you to explain the concept of scalability to team. How would you do that? Several managers on the team have heard of TCO but are not quite sure what it is. How would you explain it to them.

  Craete an inheritance hierarchy for classes quadrilateral

Write down an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the superclass of the hierarchy.

  Figure out how opening multiple simultaneous connections

I know the processor deals with each request either by LIFO or FIFO and never gets confused about what to do and I am sure it could handle such pressures like opening multiple pages all at one time well.

  Printing of fibonacci series

Write down a program which utilized a loop to determine the first seven values of Fibonacci number sequence explained by the following formula.

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