Write a program to compute numeric grades for a course.

Assignment Help Operating System
Reference no: EM13943148

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: EM13943148

Questions Cloud

What is the purchase price of the wine in us dollars : WSM Wine Importers, Inc. purchased 75,000 cases of French wine at a cost of 6,000,000 Euros. If the current exchange rate is 0.7576 Euros to the U.S. dollar, what is the purchase price of the wine in U.S. dollars?
Write a function isvowel() that test whether char is vowel : Use your function in a program that reads the standard input file and writes to the standard output file, deleting all vowels
Compare and contrast online analytic processing : Write a one page paper (250 words) on Compare and contrast Online Analytic Processing (OLAP) and Online Transaction Processing (OLTP); also discuss Codd's rules for TP databases and OLAP databases (New Times Roman, 12 pt, double spaced, Essay). Ci..
Specific drug that can be purchased over-the-counter : Discuss one specific drug that can be purchased over-the-counter, and is often misused. Discuss ways can a nurse help a client/ family to be compliant with medications that do not require a prescription
Write a program to compute numeric grades for a course. : 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
Whether the company decision to be more ethical : Your presentation should include some analysis of whether the company's decision to be more ethical is proving to be a success amongst consumers or not, providing example of why that is the case.
What are the supporting torques : What is the very largest torque T that can be applied with elastic behavior everywhere? (Hint: cut combined shaft at C and consider separate shaft). What are the supporting torques?
Seminal paper by diffie and hellman : Appearing in the seminal paper by Diffie and Hellman, the first published public-key algorithm that defined public-key cryptography [DIFF76] is referred to as the Diffie-Hellman key exchange (Stallings & Brown, 2008, p. 641).
Discuss one specific drug given for alzheimer : Discuss one specific drug given for Alzheimer's. What ways can a nurse help a client/ family to be compliant with medications for Alzheimer's disease

Reviews

Write a Review

Operating System Questions & Answers

  What is the application layer protocol involved

What is the full (expanded) address of the abbreviated IPv6 address FDEC::CF:0:FFFF - what is the type of block of the abbreviated IPv6 address

  What are the processes that are not bothered by the swapper

What are the processes that are not bothered by the swapper? Give Reason. What are the requirements for a swapper to work?

  Operating system as it is running on computer system

The following four requests could come in to the operating system as it is running on computer system: Clock in computer has just "ticked", and we require to update seconds counter.

  File compression

Research the Internet or create your own files which meet the following criteria: a) gzip compresses by more than 80 percent b) gzip compresses by less than 10 percent

  Compute average memory access time

Compute Average Memory Access Time under a variety of memory system configurations and workload assumptions

  Find the total number of bytes in the frame

Determine how long does it take to transmit a 10baseT Ethernet frame that contains 256 bytes of data and ignore all the interframe gap that follows the frame.

  Millions words in the encyclopedia brittanica

Many computers use one byte (8 bits) of data for each letter of the alphabet. There are 44 millions words in the Encyclopedia Brittanica. What is the bit density (bit/in^2) of the head of a pin if the entire encyclopedia is printed on it? Assume ..

  Design virtual memory system for new operating system

You are asked to design the virtual memory system for a new operating system working on small mobile devices. The memory operates at 333 MHz with a word size of 4 bytes.

  What characteristics do mainframe operating systems have

What are the fundamental differences between Windows®, Mac OS®, UNIX, and Linux operating systems for personal computers? What unique characteristics do mainframe operating systems have?

  Testing a motherboard

Assume you wish to test a motherboard used in an installation before you proceed too far into the installation. From the devices listed below, choose the minimum devices

  What is a thread

What types of problems lend themselves to Processes? Is one better than the other? Why or Why Not.

  Determine largest value for which system is schedulable

Assume that four events need 35,20,10, and x me=sec of CPU time, respectively. Determine the largest value of x for which system is schedulable?

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