Write cpp program that will ask user for name of input file

Assignment Help C/C++ Programming
Reference no: EM131214200

Program

Write a C++ program that will:

Ask the user for the name of an input file. Read in this name and open that text file for input.

Ask the user which of two options they want to do:

Read in student data
Count lines and characters

Read in the user's response, and perform the specified operation.

Specifically, if the user chooses the student data option,

For each student record,

read in the student name (a string),
read in the number of scores for that student (an int)
read in all of the scores for that student, adding them into

a total as they are found (doubles).

Calculate the average score for that student (double).
Write out the student name, the number of scores, and the

average score for that student.

Repeat until no more student records are found.

If the user chooses the lines and characters option,

Read in each line of the file
If a line contains some text (is non-empty), then count that line and

find the number of characters that the line contains.

Continue until no more lines of text are found in the file.
Write out the total number of lines that contained text and the

Average number of characters that were found per line.

Reference no: EM131214200

Questions Cloud

What types of investment projects would you expect : FINC20018 / FINC20006: Assessment Task 2: Individual or Group Assignment. Please respond in writing to the following questions: What types of investment projects would you expect to find in a minerals company
Describe what is meant by transitive dependency : Describe what is meant by transitive dependency, and describe how this type of dependency relates to 3NF. Provide an example to illustrate your answer.
Assignment for statistics class : One of your classmates is working on an assignment for her statistics class. She created an online survey to collect student opinions about the college class schedule. She only has time before her engineering class to distribute the link to the su..
Which type of interview is most appropriate to use : Which of the following is a multicultural issue for any of the psychological instruments customarily used in the United States? Larry is a single, 40-year-old male who runs his own business. Lately, he feels tired all the time, lacks motivation..
Write cpp program that will ask user for name of input file : Write a C++ program that will Ask the user for the name of an input file. Read in this name and open that text file for input. Ask the user which of two options they want to do: Read in student data and Count lines and characters.
Members of the population : You successfully completed statistics, and the Math Department Chair recruited you to be a tutor. It's day one on the job, and your first pupil is correcting her mistakes on a recent statistics exam. She incorrectly listed the reasons that researc..
National highway traffic safety administration : Traffic Safety: Here is a passage from a study published by the National Highway Traffic Safety Administration in 2007.
Human world of actual men and women : Suppose that the researchers' scaled up dolls suddenly found themselves in the human world of actual men and women. Convert Ken's chest, waist, and hips measurements to z-scores. Which of those measures appears to be the most different from Ken's r..
Find the slip and the number of poles of the motor : A 12 pole, 3 phase alternator is coupled to an engine running at 500r.p.m.- Find the slip and the number of poles of the motor.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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