high on Essays logo

Our Services

Get 15% Discount on your First Order

w10

Highlighted in the red are the changes for the phase 3 compare to phase 2

You are asked to create a program that will be used to create quizzes and test users based on these quizzes.

1. Prompt a secret word and proceed if it matches a secret code.

2. Your program should have two modules: quiz creation mode and test mode. User will be prompted in the beginning to choose from these two modes. For example:

“Welcome to the quiz master: please enter 1 if you want to manage questions, 2 if you want to take a quiz, 3 if you want to exit”

If wrong number/option entered show the message and ask again.

3. If user chose to enter quiz creation module

a. the applications will look for an existing file with quizzes. If it does not exists program should create one. If it exists open it, but do not replace the content.

b. Application then asks user 1) to add new question, 2) to delete existing question, 3) to list all available questions 4) to go to the main module selection menu.

We do not need to have edit capability, this can be done by deleting and adding it back.

c. If user wants to add a new question.

i. Prompt the following information

1. Question Code. This should be a non-empty unique value across all existing questions.

2. Question text.

3. Number of possible answers

a. Loop as many times as there should be answers and prompt to enter answer text

4. Correct answer

ii. Save this information in the file.

iii. Once a new question entered show the “manage questions“ menu

d. If user wants to delete a question, prompt the user to enter Question Code.

i. If question with the code exists, then delete it, show the message that question is deleted and show “manage questions“ menu

ii. If question with the code not exists then show the message that code is incorrect

e. If user wants to list all questions then

i. Print to the screen the list of questions, answers and the correct answer

ii. show “manage questions“ menu

4. If user choses to enter quiz taking module

a. Load all the questions from the file

b. Show total number of questions available.

c. Prompt to enter test taker information

i. First Name

ii. Last Name

iii. Number of questions

1. If number of questions less than total number of questions then ask to enter this information again

d. Start quiz

i. Randomly choose questions as many as user selected

ii. Iterate though these questions

1. Ask question

2. Show possible answers

3. Prompt to enter the correct answer

a. If answer is not available ask to choose from available options

iii. Once all questions answered provide report

1. Total number of questions answered

2. Correct answers

3. Incorrect answers

4. % of correct answers

5. Grade: A -90% up, B – 80% up, C- 70% up, or F

e. Show main menu

5.
You need to encapsulate/hide the logic responsible of displaying menu, validation of menu options, as well as user selection of menu into a separate class called MenuHandler

Here is the test output

Welcome to the quiz master.

Please enter the secret code or enter -1 to exit: Blabla

Secret word is incorrect

Please enter the secret code or enter -1 to exit: Blablabla

Secret word is correct

Please choose from the following options

1) Manage questions

2) Take a quiz

3) Exit

4

You have selected option 4, which is invalid, please select again

1) Manage questions

2) Take a quiz

3) Exit

1

You have selected option 1 – manage questions

Please choose from the following options

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

5

You have selected option 5, which is invalid, please select again

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

1

You have selected option 1 – Add new question

Please enter question code:

Question code cannot be empty

Please enter question code: Q0001

Please enter question text:

Question text cannot be empty

Please enter question text: What 1 + 1?

Please enter number of possible answers:

Number of possible answers cannot be empty

Please enter number of possible answers: 4

Please enter answer 1 to the Q0001:

Answer cannot be empty

Please enter answer 1 to the Q0001: 2

Please enter answer 2 to the Q0001: 3

Please enter answer 3 to the Q0001: 4

Please enter answer 4 to the Q0001: n/a

Please enter the number corresponding to a correct answer:

Number corresponding to a correct answer cannot be empty

Please enter the number corresponding to a correct answer: 5

You have selected 5, which is invalid number corresponding to a correct answer

Please enter the number corresponding to a correct answer: 1

Question Q0001 is saved!

Please choose from the following options

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

1

You have selected option 1 – Add new question

Please enter question code: Q0001

Question with code Q0001 already exists

Please enter question code: Q0002

Please enter question text: What 1 + 2?

Please enter number of possible answers: 4

Please enter answer 1 to the Q0002: 2

Please enter answer 2 to the Q0002: 3

Please enter answer 3 to the Q0002: 4

Please enter answer 4 to the Q0002: 5

Please enter the number corresponding to a correct answer: 2

Question Q0002 is saved!

Please choose from the following options

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

1

You have selected option 1 – Add new question

Please enter question code: Q0003

Please enter question text: What 1 + 3?

Please enter number of possible answers: 4

Please enter answer 1 to the Q0003: 2

Please enter answer 2 to the Q0003: 3

Please enter answer 3 to the Q0003: 4

Please enter answer 4 to the Q0003: 5

Please enter the number corresponding to a correct answer: 3

Question Q0003 is saved!

You have selected option 1 – Add new question

Please enter question code: Q0004

Please enter question text: What 2 + 3?

Please enter number of possible answers: 4

Please enter answer 1 to the Q0004: 2

Please enter answer 2 to the Q0004: 3

Please enter answer 3 to the Q0004: 4

Please enter answer 4 to the Q0004: 5

Please enter the number corresponding to a correct answer: 4

Question Q0004 is saved!

Please choose from the following options

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

2

You have selected option 2 – Delete Existing question

Please enter the code for the question you want to delete:

The code for the question you want to delete cannot be empty

Please enter the code for the question you want to delete: Q0005

Question with code Q0005 does not exist

Please enter the code for the question you want to delete: Q0003

Question Q0003 is deleted!

Please choose from the following options

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

3

You have selected option 3 – Print all questions

Question Q0001: What 1 + 1?

Possible answer

1: 2

2: 3

3: 4

4: n/a

Correct answer is 1

Question Q0002: What 1 + 2?

Possible answer

1: 2

2: 3

3: 4

4: 5

Correct answer is 2

Question Q0004: What 2 + 3?

Possible answer

1: 2

2: 3

3: 4

4: 5

Correct answer is 4

Please choose from the following options

1) Add new question

2) Delete Existing question

3) Print all questions

4) Main menu

You have selected option 4 – Main menu

Please choose from the following options

1) Manage questions

2) Take a quiz

3) Exit

2

You have selected option 2 – Take a quiz

There are 3 question(s) in the file

Please enter your first name:

First name should not be empty

Please enter your first name:Faig

Please enter your last name:

Last name should not be empty

Please enter your last name:Garayev

Please enter number of questions:

Number of questions should not be empty

Please enter number of questions: 4

Maximum number allowed is 3

Please enter number of questions: 2

Starting quiz

Question Q0001: What 1 + 1?

Possible answer

1: 2

2: 3

3: 4

4: n/a

Please enter the correct option: A

A is invalid option

Please enter the correct option: 1

Question Q0003: What 2 + 3?

Possible answer

1: 2

2: 3

3: 4

4: 5

Please enter the correct option: 3

Quiz is now complete.

Here are the results

Faig Garayev

Total Questions: 2

Correct answers: 1

Incorrect answers: 1

% of correct answers: 50%

Your grade is F

Please choose from the following options

1) Manage questions

2) Take a quiz

3) Exit

3

Bye!!!

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit
Reviews

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Comprehensive Presentation on SWPBIS Create and upload your presentation on this week’s topic. Your presentation should include: 1. Tier 1 systems

Comprehensive Presentation on SWPBIS Create and upload your presentation on this week’s topic. Your presentation should include: 1. Tier 1 systems components (e.g., leadership, funding and resources, training and coaching, and data procedures) 2. Tier 1 problem-solving approaches 3. Tier 1 fidelity measures Rubric Presentation Deck (R) Presentation Deck (R) Criteria Ratings

Case Study Template Name: ___________________________ Module 6, week _____ Class Commentary Case Study: _______________________ Pages:

Case Study Template Name: ___________________________ Module 6, week _____ Class Commentary Case Study: _______________________ Pages: _________________ NEXT STEPS Complete the Next Steps from your case study using the recommended problem-solving model (templates included below). USE THIS TEMPLATE FOR DENT DENT Problem Solving Model (1) DEFINE the question carefully: What are