Write a program that grades an online quiz

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

Lab Flowchart

For this assignment, you will write a program that grades an online quiz. The program asks the student to enter his/her answer to 10 multiple-choice questions. The program stores the student's responses in an array and then compares those responses to the correct answers to determine the student's grade.

The correct answers are:
1 2 3 4 5 6 7 8 9 10
B C A D B A D C A B

Your program must use this main procedure. You must implement the inputAnswers and numCorrect procedures and test the program to make sure it works correctly.

For this program both correctAnswers and given are arrays of characters. Note that given is an out parameter to inputAnswers, and numRight is an out parameter to numCorrect.

Raptor makes this a little tricky because even if a user enters a single character as input, Raptor considers it a string instead of a character. To convert an input string to a character, I recommend this procedure.

Modify your program so that it adds an extra line after the quiz grade that displays which question numbers the student got wrong. It could look like this:

You answered the following questions incorrectly: 2 6

You may either include the extra credit in your initial submission, or in an additional submission.

Lab C++

Using the flowchart for Lab as a guide, write a C++ program that does the same thing. Your C++ program must also use two procedures (called functions in C++) to input the student responses and to determine how many answers were correct.

Remember Raptor arrays start at 1, but C++ arrays start at 0.

Here is what the function header for inputAnswers should look like;

void inputAnswers(char given[ ] )

The numRight function should return an int.

There is no extra credit for the C++ version of this assignment, but you may, if you wish, submit a program which is the C++ equivalent of the extra credit version of the Lab Flowchart.

Test your program to make sure it works properly, and then upload just the C++ code in the TurnItIn assignment.

Reference no: EM131299554

Questions Cloud

Prepare a consolidated statement of comprehensive income : The remaining life of these non-current assets is six years.- Prepare a consolidated statement of comprehensive income for the year ended 31 December 20X0.
Create javafx application named to animate man running laps : Create a JavaFX application named RunningMan.java to animate a man running laps. The man should run from left to right until the edge of the window is reached. The man should then begin running in the opposite direction.
Regulatory dimensions of derivatives and commodity markets : Evaluate the ethical, legal, and regulatory dimensions of derivatives and commodity markets.- Analyze major ethical dilemmas and decisions characteristic in derivatives and commodity markets.
What is the average cost of the firm : a. What is the average cost of the firm? b. What can you say about the marginal cost of the firm?
Write a program that grades an online quiz : For this assignment, you will write a program that grades an online quiz. The program asks the student to enter his/her answer to 10 multiple-choice questions.
Prepare a consolidation worksheet : ACCT302 Advanced Financial Accounting Assignment. Give all eliminating entries needed to prepare a consolidation worksheet for 20X9 assuming that Pie Co. uses the fully adjusted equity method to account for its investment in Strawberry Company
What is its percentageafter-tax cost of debt : Micro Spinoffs Inc. issued 20-year debt a year ago at par value with a coupon rate of 6%, paid annually. Today, the debt is selling at $1,130. If the firm's tax bracket is 30%, what is its percentageafter-tax cost of debt? Assume a face value of $..
Prepare a consolidated statement of comprehensive income : Prepare a consolidated statement of comprehensive income for the year ended 31 December 20X0.
Quantity reflects the marginal valuation : Consumer Surplus: The height of the demand curve at a given quantity reflects the marginal valuation of the last unit of that good consumed. For a normal good, an increase in income shifts the demand curve to the right and therefore increases its ..

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