Write cpp program to read in various types of test questions

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

Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the questions into an array of questions. You will need to implement the following class hierarchy (given in UML):

(This link should show the class hierarchy, please let me know if it doesn't) Once the test bank has been loaded, simply iterate over the array of questions and have each question printed out to the screen. The test bank (text file) will have the following format: *Line 1 will be an integer value, indicating how many questions in the file *Each question will start with a line that starts with either "MC" or "TF" followed by a space and then the point value of the question. *The next line will be the actual question.

*If the question was True/False, the following line will be the answer, either "True" or "False" *If the question was multiple choice, the following line will be an integer value indicating how many choices will be provided for that question. The following lines will be the choices. There will never be more than 6 choices. The final line following the choices will be the answer: "A" or "B" or "C" or "D" or "E" or "F". A sample test bank file is as follows: 3 TF 5 There exist birds that cannot fly? true MC 10

Who was the President of the USA in 1991? 6 Richard Nixon Gerald Ford Jimmy Carter Ronald Reagan George Bush Sr. Bill Clinton E TF 10 The city of Boston hosted the 2004 Summer Olympics.

Reference no: EM131251203

Questions Cloud

Analyze the prioritizing process : Analyze the prioritizing process at D. D. Williamson. Suggest two (2) recommendations to improve the prioritizing process. Create a scenario where the implemented process at D. D. Williamson would not work.
Sole proprietor who performs excavating services : In July of 2009, Mr. Mann, a sole proprietor who performs excavating services, purchased and put to use for business a piece of heavy equipment for $36,500. This piece of equipment was depreciated using the MACRS 150% DB method of depreciation over t..
Corporate social responsibility : 1. In terms of corporate social responsibility, discuss three ways that a company can focus on the needs of its stakeholders without neglecting its shareholder obligations.
Compute the gross pay for outbound sales representatives : Elemarketers receive $15 commission on all new customers they sign up for phone service through Birch Phones. Each telemarketer works 40 hours. Because these employees are paid solely on commission, the employer must ensure that they earn the federal..
Write cpp program to read in various types of test questions : Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the questions into an array of questions.
Examples of political risks on economic systems : What are some micro and macro examples of political risks on economic systems?
What are the possible issues if your os automatically mounts : What is the significance of the Chain of Custody PDF form from Adepto? Why is it needed? What are the possible issues if your OS automatically mounts your drive prior to creating your forensic duplicate?
Unethical decision or exhibited unethical behavior : Think back to a time when you had a supervisor or coworker who you believe made an unethical decision or exhibited unethical behavior. List at least two reasons why you think people are tempted to act unethically. Describe the most effective safe ..
What will your annual loan payment be : Dinero Bank offers you a five-year loan for $50,000 at an annual interest rate of 7.5 percent. What will your annual loan payment be?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Declare a 1-dimensional array of integers

In pseudocode and in C code, declare a 1-dimensional array of Integers called InternetHits that will hold up to 10 Integer values representing the number of hits a Web site receives.

  Operating system and cpu scheduling

Operating System and CPU Scheduling

  Program that converts kilograms into pounds

Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds output both the weights rounded to two decimal places.

  Generate a series of pseudo random numbers

You will write a program to generate a series of pseudo random numbers, using a linear feedback shift register method. You will start with an arbitrary number (not zero) x with a representation in n bits.

  Problems of boolean algebra in computer organization.

It is an explanation for solving the problems of Boolean Algebra in Computer Organization.

  Relationship between obesity and food consumption

Researcher states that there is relationship between obesity and food consumption. Obesity is the condition of excess body fat and it can get diabetes, heart disease, high blood pressure and also fatal. People in the US getting obese because of the l..

  Draw a two-dimensional house seen from the front

Draw a two-dimensional house seen from the front, the way a child would: with a door, two windows, and a roof with a chimney. Feel free to add details; mabe have "smoke" come out of the chimney.

  . write a segment of code that prints the number of elements

Assuming the array x has been defined as: int x[n]; for some n and that values have been assigned to all the elements. Write a segment of code that prints the number of elements between (but not including) the largest and smallest values in the array..

  Function that accepts a score for a driver''s license

Write a function that accepts a score for a driver's license facility, an int or a float, and returns a letter. If the score passed in is less than 75, then the letter returned is an F for Fail. Otherwise, the letter returned is a P for Pass.

  Write a c program that reads a data file of floating numbers

Write a program that reads a data file of floating numbers into an array and prints the array elements along with the number of items in the array

  Implementation of the fibonacci sequences

Provide the c++ implementation of the Fibonacci sequences. Please give the two approaches to the problem

  Up through 2 to the 10th power

program should compute and output all of the "powers of two" from 2 to the 0th power, up through 2 to the 10th power.

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