Program to calculate numeric grades for a course

Assignment Help Operating System
Reference no: EM1379742

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:

Create a program to calculate numeric grades for a course. The course records are in a document that will serve as the input document. 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: EM1379742

Questions Cloud

Are following objective functions for an lp model equivalent : Are following objective functions for an LP model equivalent. That is, if they are both used, one at a time, to solve a problem with exactly same constraints, will optimal values of X1 also X2 be same in both cases.
Combining global variables and functions : The parameter list is the normal means to supply values to a function. Global variables are an alternate means for a function to have access to values.
What is core competency of nike : Compare strengths, weaknesses, opportunities also threats of Nike to its competitors. How vision does also values affect how company will respond to each.
Are they keeping also attracting top talent : Are they keeping also attracting top talent. Are there hiring increases or loss of key employees, etc.
Program to calculate numeric grades for a course : Create a program to calculate numeric grades for a course. The course records are in a document that will serve as the input document.
Which method shuz world should use for manufacturing : Shuz world should use for manufacturing of its sneakers, utilizing appropriate decision analysis tool. Which method Shuz world should use for manufacturing.
Software faults - windows xp : Analysis shows that there are about five faults per 1000 lines of code in carefully made programs, which means that one million lines of codes will have 5000 faults.
Explain training equity also glass ceiling : Explain training equity also glass ceiling also then analyze how these terms related to Ms. Conner. Analyze issues that Ms. Conner dealt with also suggests ways that these issues could have been avoided or mended.
Show possible interleavings of the execution : A concurrent program with 2-procedure, p and q, defined as follows, A,B,C,D, and E are arbitrary atomic statements. Suppose that the main program does a parbegin of the two procedure.

Reviews

Write a Review

Operating System Questions & Answers

  Page fault with lru page replacement policy

Computer has 16 pages of virtual address space but only three physical pages frames. Initially physical memory is empty. Program references virtual pages in order 1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2 Which references a page fault with LRU ..

  Security of information and data in an organization

The final security measure my company implements well is monitoring internet usage through limiting the access for most workers to search websites that are not related to the company.

  Pros and cons of using embedded uid and pw

Think about an embedded user id and password which provides me access to a client/server environment. Discuss the pros and cons of using an embedded uid and pw?

  Efficiency and effectiveness of project communications

Determine what types of data are shared through documents and what types are shared through meetings? Discuss how has social networking affected the efficiency and effectiveness of project communications?

  Web security threats

Think about the given threats to Web security and explain how each is countered by a particular feature of SSL.

  Fragmented mean in reference to hard drives

What does fragmented mean in reference to hard drives, and what, if anything, should be done to prevent it. Describe the general path data takes in an application from user input to the computer hardware.

  Requirement for routers to support ipv4 and 6 protocol stack

The answer describes the requirement for routers to support both IPv4 and IPv6 protocol stacks and describes the several types of connections a dual stack router can support, and why such connections are necessary.

  Operating system for a multimedia pc

Do you really think that the selection of Operating System makes a large difference when it comes to a specific purpose?

  Degree of scope creep

There is a school of thought that discusses that, far from being undesirable, few degree of scope creep may in fact be beneficial for certain types of assignments.

  Determine the format of main memory address

Given that a system has two way set associative cache of size eight KBytes, with sixteen bytes cache lines, and a byte-addressable main memory of size 64 MBytes.

  Differences between logical and physical security

With the help of analogy to explain the differences between logical and physical security to a nontechnical person.

  Television clips in a powerpoint presentation

Computers and television would work is when you tape television demonstrate that can be used to give flavor to PowerPoint Presentations.

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