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

  How two floating point numbers are added together

describe how two floating point numbers are added together, specifying all necessary operations on the various parts of the operands and the result.

  Enterprising the data mining and data warehousing

Discuss the most proficient ways in which an organization may invest in enterprising the data mining, data warehousing, and the data analytics capabilities.

  Explain the type of protocol you would use in this situation

Your company has a network that contains several NetWare 4.11 servers and uses IPX as the routing protocol. Each of the network segments has minimum one NetWare server on it. Which of the following responds to a Get Nearest Server (GNS)request from..

  Developing the modular program

Develop the modular program which asks user in order to enter the monthly costs for following expenses incurred from the operating his or her automobile: loan payment, gas, insurance, oil, tires, and maintenance.

  Board of your business it network for discussion

In another year, after all projects are completed, you plan to convert back to a volunteer basis with AllTechComm, and to find out more profitable employment, preferably with a major corporation. You are doing all of the research and networking yo..

  Program for dissimilar values for real numbers

Program for dissimilar values for real numbers

  How to create a coke machine program in c++

We would start by having the users insert their money. Since they can not physically insert the money, we will just ask them how much they wish to insert and we will keep track of how much money they have inserted.

  What is the history of osi model and benefits

Why you will recommend either asymmetric key encryption, symmetric key encryption, or no encryption at all for the Email correspondence.

  Detecting the malicious software

Consider the following fragment within an authentication program: username = read_username(); password = read_password(); if username is “l33t h4ck0r”.

  What is the sql

Recently AMI has been experiencing significant downtime because of  a failing software application written for AMI when the company started. This Access database application is responsible for a main manufacturing process.

  Aspect of software engineering

Select a topic related to some aspect of the Software Engineering. Write about 2500+ word (minimum) paper on that particular topic-single spaced 12 pt times or times new roman font.

  Define compensation structure and job design research

Assess value of the position using a job-based approach. The job based approach will assess the value that the specific position brings to the organization.

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