Write a program that plays a simple trivia game

Assignment Help Computer Engineering
Reference no: EM13323579

Write a program that plays a simple trivia game. The game should have five questions. Each question has a corresponding answer and point value between 1 and 3 based on the difficult of the question. Implement the game using three arrays. An array of type String should be used for the questions. Another array of type String should be used to store the answer. An array of type int should be used for the point values. All three arrays should be declared to be of size 5. The index into the three arrays can be used to tie the question, answer, and point value together. For example, the item at index 9 for each array would correspond to question 1, answer 1, and the point value for question 1. The item at index 1 for each array would correspond to question 2, answer 2, and the point value for question 2, and so forth. Manually hardcode the five questions, answer, and point values into your program using trivia of your choice. (Note: Since the Internet is the source of everything, you can turn to sites such as www. triviaplaying.com for some questions answers to use if you can' t think of any yourself.) Your program should ask the player each question one at a time and allow the player to enter an answer. If the player's answer matches the actual answer, the player wins the number of points for that question. It the player's answer is incorrect, the player wins no points for the question. Your program should show the correct answer if the player is incorrect. After the player has answered all five questions, the game is over, and your program should display the player's total score.

Reference no: EM13323579

Questions Cloud

What is the maximum number of instructions : What is the maximum number of instructions you can expect to be able to use in the program that processes the data? Keep in mind that your applications program must share memory with the operating system and with your data.
Define the mass balance equation and charge balance equation : Write the mass balance equation and charge balance equation for a solution that is 0.1 M FeCl3 and 0.2 M FeCl2
What is elongation of the pipe as it just begins to come out : The segments of pipe and couplings used for drilling an oil well 15,000 ft deep are made of A-36 steel weighing 20 lb/ft. They have an outside diameter of 5.50 in. and an inside diameter of 4.75 in.
Explain the appropriate m1 components : Use equations and words to explain how 2Px, 2Py, and 2Pz orbitals are constructed from 2P orbitals and the appropriate m1 components.
Write a program that plays a simple trivia game : Write a program that plays a simple trivia game. The game should have five questions. Each question has a corresponding answer and point value between 1 and 3 based on the difficult of the question.
What is min sight distance that should be provided on road : f the design speed of a multi-lane highway is 60 mph, what is the minimum sight distance that should be provided on the road if (a) the road is horizontal and (b) the road has a maximum grade of 5 percent
What is the direction of the balls displacement : A ball rolling on a table has a velocity with rectangular components vx = 0.50m/s and vy = 0.60m/s. What is the direction of the balls displacement
Evaluate the molar solubility of pb(io3)2 in water : Calculate the molar solubility of Pb(IO3)2 in water by systematic method. {ksp for Pb(IO3)2 = 2.5 x 10^-13}
Determine if the screen needs to be cleaned why or why not : After operating for a period of time, assume that the opening size decreases to 10-mm due to the accumulation of materials (debris) on the screens.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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