Write a simple trivia quiz game

Assignment Help Computer Engineering
Reference no: EM131951361

Problem

Write a simple trivia quiz game. Start by creating a Trivia class that contains information about a single trivia question. The class should contain a string for the question, a string for the answer to the question, and an integer representing the dollar amount the question is worth (harder questions should be worth more). Add appropriate constructor and accessor functions. In your main function create either an array or a vector of type Trivia and hard-code at least five trivia questions of your choice. Your program should then ask each question to the player, input the player's answer, and check if the player's answer matches the actual answer. If so, award the player the dollar amount for that question. If the player enters the wrong answer your program should display the correct answer. When all questions have been asked display the total amount that the player has won.

Reference no: EM131951361

Questions Cloud

Examine some notably successful software-intensive systems : Examine some notably successful or unsuccessful software-intensive systems. To what extent was success or failure due to architectural issues.
What are the key determinants of success and failure : What are the key determinants of success and failure for each system? As an architect, how would these determinants change your approach to concept formulation.
Discuss about the national infrastructure protection plan : Create 3-5 page professional memo about your assessment of what needs to be done to meet the standards based on the National Infrastructure Protection Plan.
Consult one or more of references for software heuristics : Consult one or more of the references for software heuristics. Extract several heuristics and use them to evaluate a software-intensive system.
Write a simple trivia quiz game : Write a simple trivia quiz game. Start by creating a Trivia class that contains information about a single trivia question.
Why has supply chain management : Why has Supply Chain Management become a much more important topic in today's study of International operations management than 20 years ago?
What are the differences between emrs and ehrs : What are the differences between EMRs and EHRs? What challenges have they presented for health care managers? And, what challenges does the future proffer?
Write a function to compare two c-strings for equality : Write a function to compare two C-strings for equality. The function should return true if the strings are equal and false if they are not.
How will your plans affect the business : How will they affect the balance between securing the systems, and allowing the business enough breathing room to function effectively?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a short java function that takes two long values

Write a short Java function, isMultiple, that takes two long values, n and m, and returns true if and only if n is a multiple of m, that is, n = mi for some int

  Program is internet based and it is expected to boost sale

Sunnyville Inc. is in the business of selling home appliances. Sunnyville Inc. has over 50 sales agents all over the country. The management at Sunnyville Inc. has decided to implement an online sales program. The new sales program is Internet bas..

  Write a routine to transform an environment map to surface

Devise an algorithm for implementing the progressive refinement radiosity method. Write a routine to transform an environment map to the surface of a sphere.

  Discuss about the non statistical attributes sampling

Non statistical Attributes Sampling. Monroe Curtis is auditing the revenue cycle of Kentucky Distilleries and has elected to perform a non statistical test.

  Create a web page that provides five helpful facts

Create a Web page that provides five helpful facts about copyright and the Web. Provide the URLs of the Web sites you used as resources.

  Developing ways to support every applications

List some of the ways which we may guarantee that the majority of our target audience may play our applications.

  Change is an integral part of an organization various

change is an integral part of an organization. various forces drive changes. all changes however are not successful

  What javascript variable is associated with z-index property

What JavaScript variable is associated with the z-index property? What exactly is stored in the screen X and screen Y properties after a mouse click?

  Explain some of the examples of poor quality in it projects

discuss some of the examples of poor quality in it projects presented in the what went wrong? section. could most of

  When you assign a default value to a parameter

When you assign a default value to a parameter, it then becomes an optional parameter.

  What happens in a virtual circuit packet-switched network

What happens in a virtual circuit packet-switched network if a node or communications link along the virtual path fails?

  What important capability is lacking in a markup language

What important capability is lacking in a markup language? What problem is addressed by using a public-key approach to encryption?

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