Write the output of the program

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

The possible responses are a, b, c, or d. A file has been created that contains the following:

1st line: The answer key consists of 20 lower case letters that represent the correct answers to the exam. There will be no blank spaces between the letters.

Example: abcdabcdabcdabcdabcd

2nd-last line: Each line will start with the first and last names of a student (names will be separated by at least one blank space). The names may be in a mixture of upper and lower case letters. The names will be followed by at least 1 blank space and then that student's responses to the test questions will be provided. There will not be any blank spaces between the responses, but they may be in a mixture of upper and lower case letters. An upper case letter should be considered correct if it matches the lower case equivalent in the key.

Example: biLL jOnEs aBcdAbCDabDcabDDABCD

NOTE: The key will consist of exactly 20 characters. However, the student responses may consist of more or less than 20 characters. Assume that the first 20 characters in a student response correspond to the 20 test questions.

In other words if a student only provides 15 answers, then the last 5 questions are wrong. If a student provides 25 answers, the last 5 responses should be ignored.

Design a C++ program that will interactively prompt for and read the name of the input file interactively prompt for and read the name of a file to write the output of the program to write the following to the specified output file your name, section #, assignment # a report that displays the names of the students along with their test scores (see formatting specifications below) the number of students who took the test with a label (maximum class size is 50) the class average displayed with 3 digits to the right of the decimal and a label the standard deviation of the test scores with 3 digits to the right of the decimal and a label display the highest score and list the names of the students who received it Grading a Test Each of the questions on the test is worth 5 points.

The test score is the # of correct responses multiplied by the point value of a question. Computation of Average and Standard Deviation If n = # of values, and datai = the ith value, Formatting Requirements for Output Arrange information in the grade report into 2 columns with headings. The first columns should be labeled "NAME" and the second column "SCORE". Reformat names so that the first letter of each name is capitalized and the remaining letters are lower case. Left justify the names (maximum length of full name is 20 characters, 10 per name). Right justify the scores and display with no decimals (maximum score is 100) Leave a blank line before and after the statistics (student count, average and standard deviation).

When displaying the list of students with the high score, each name should be on a separate line. Input File Assumptions/Definitions maximum number of students will be 50 the names and responses for each student will be on a separate line of the file each line of the file will be terminated by a linefeed the input file will exist and not be empty.

REQUIREMENTS The program must make use of functions to modularize the code. No global variables or goto statements can be used in the program. The input file can only be opened once for reading. Arrays MUST be used to store the names of students and scores on the exams.

Records and/or classes CANNOT BE USED to store the names and scores.

Reference no: EM13102435

Questions Cloud

Explain policies in world war two or the cold war : Consider United States' actions and policies in either World War Two or the Cold War. How did they reflect this tension? Give suitable examples.
Estimating statistics-condition probability : A survey showed that 24% of college students read newspapers on a regular basis and that 81% of college students regularly watch the news on TV. The survey also showed that 21% of college students both follow TV news regularly and read newspapers ..
What is the probablity the speeding person : The radar traps at each of the locations L1 L2 L3 L4 are operated 40 30 20 and 30 of the time a person who is speeding on his way to Penn State has a probablities of 2 1 5 and 2 respectivley of passing through these locations what is the probablit..
What is the electric force on the k+ ion due to the cl : A K+ ion and a Cl ion are directly across from each other on opposite sides of a membrane 8.9 nm thick. What is the electric force on the K+ ion due to the Cl ion? Ignore the presence of other charges. What direction will it go in relation to the ..
Write the output of the program : Design a C++ program that will interactively prompt for and read the name of the input file interactively prompt for and read the name of a file to write the output of the program to write the following to the specified output file your name, sect..
Calculate the angular wave number : A wave has an angular frequency of 110 rad/s and a wavelength of 1.80 m. Calculate the angular wave number and the speed of the wave.
Determining binomial distribution probabilities : Population of consumers where 30% of them favored a new product and 70% of them disliked it. If 20 persons are sampled, what are the probabilities of finding: Binomial
What are the new mutual forces : Two charges are separated by a distance d and exert mutual attractive forces F on each other. If the charges are separated by a distance of d/3, what are the new mutual forces? q1 = +2C and q2 = -2C
How to maximize employee productivity and job satisfaction : What kinds of benefits you would offer your employees if you were the employer seeking to maximize employee productivity and job satisfaction.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program that forks two child processes

Write a C program that forks two child processes. The parent process will print all prime numbers up to 229, the first child process will print the first 50 Fibonacci numbers.

  Assign passed value to function to return value

Assign passed value to this member and another function to return value. Your main should read the integer from an input data file, and write the output to the output data file.

  Program to print out invalid number to character

The integer must contain 3 distinct non-zero number, or the program will print out invalid number.it should print out invalid query.

  C program to calculate power loss in transmission line

Write program in C to calculate the power loss in transmission line with resistance of 0.05 ohms/mile. Calculate power loss if 500 kW of power is transmitted from power generation station

  Implement a simplified version of the set class

You will implement a simplified version of the set class. You must implement all functions defined in the provided file set.h. You may add other member functions and variables as necessary.

  Program to output value of tenth component of array

Write a C++ statements to perform the following: Set value of fourth component of array alpha to three times  value of eight component minus 57.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Write short c program to develops two processes

Write down a short C program which develops two processes. Each process must repeatedly write its own unique message to test file, one character at time. Do you see garbled messages in the file? Explain why or why not?

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

  Execute tests and repetitions

Read data from standard input and store them in an array, Execute tests and repetitions

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

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