Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need a little help implementing a loop option into my 10 question quiz. I'm using C# in Visual Studio. Here is my code: using System;

image text in transcribed

image text in transcribed

Need a little help implementing a loop option into my 10 question quiz. I'm using C# in Visual Studio. Here is my code:

using System;

namespace Checkpoint_2

{

class Program

{

static void Main(string[] args)

{

Console.WriteLine("General Aviation Quiz");

//Variables

bool answerCorrect = false; // will be used to evaluate if answer is correct or not

string[] questions =

{

"1. Which mathematician's principle of fluid dynamics is the most widely taught explanation of how planes fly?",

"2. Movement of the plane about the vertical axis of motion is called?",

"3. When the pilot moves the wheel on the control/yoke to the left the result will be?",

"4. VOR stands for Variable Oscillation Radar.",

"5. Where on the aircraft would you find the green navigation light?",

"6. In aviation, ILS stands for Instrument Landing System.",

"7. What is the purpose of an aircrafts altimeter?",

"8. The four main forces acting on an air plane are: lift, drag, thrust and weight.",

"9. VFR stands for Vehicle Flight Recorder.",

"10. In aviation, what is FOD?"

}; // will be questions used on test. 6 Multiple choice and 4 true/false

string[] answers =

{

"a. Albert Einstein b. Plato c. Bill Smith d. Daniel Bernoulli",

"a. Bank b. Yaw c. Pitch d. Flight",

"a. The elevator goes up b. The right aileron goes up and the left aileron goes down c. The left aileron goes up and the right aileron goes down d. Both ailerons go down",

"true false",

"a. Left Wingtip b. Above the Cockpit c. Right Wingtip d. Tail",

"true false",

"a. To show the aircrafts airspeed b. To show the aircrafts angle of attack c. To show the aircrafts engine temperature d. To show the aircrafts altitude",

"true false",

"true false",

"a. Fire Oppression Device b. Foreign Object Debris c. Foul Odor Detector d. First Officers Den",

}; // these will stand as answer bank for all questions

string[] correctanswer =

{

"d",

"b",

"c",

"false",

"c",

"true",

"d",

"true",

"false",

"b"

}; //these are the correct answers to all the question. any other selections will be counted as incorrect

int scoreCard = 0; // everyone starts with 0 correct out of ten. once quiz is completed score will be listed as 1-10.

int[] questionsIncorrect = { };

//Welcome To Program

Console.WriteLine("James Fox, ENGR115- General Aviation Quiz");

Console.WriteLine();

Console.ReadKey();

}

}

}

Project Problem Write a quiz" program on a topic, about which you are knowledgeable. This quiz can be work related, general knowledge or any set of questions where there is a specific answer. Ignore questions where long descriptions or general answers needed. The program should display the questions, one at a time, and possible answers, and accept an answer from the user. If the answer is correct, the program should go on to the next question. If it is incorrect, store the question for the second attempt and go on to the next question. When the list of questions has ended, the questions that were missed previously, or answered incorrectly, should be displayed again, in their original order. Keep a count of the correct answers for each category of questions and display the final count after two attempts. Also, display the correct answer, when necessary, in the second round of questioning Limit the quiz to ten (10) questions. Include questions from both true/false and multiple-choice categories Four (4) possible answers should be listed in multiple-choice questions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions