Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

So I have the code and that part works, its the part where it says Take quiz with a single button. I'm not sure how

So I have the code and that part works, its the part where it says Take quiz with a single button. I'm not sure how to do the single button and then make the rest of the assignment go.

My Code:

Public Class Form1

'Declare class ()variables To acces all the way In the program Dim Proverbs() As String = {"The squeaky wheel gets the grease", "Giving is better than receiving.", "Opposite attract.", "Spare the rod and spoil the child.", "Actions speak louder than words.", "Flattery will get you nowhere.", "Marry in haste, repent at leisure."} Dim Answers() As String = {"True", "True", "False", "False", "True", "False", "True"} Dim queNumber As Integer = 0 ' keeps track of question number Dim Score As Integer = 0 'Keeps track of the score Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

'First question to start LblQuestion.Text = Proverbs(queNumber)

End Sub

Private Sub BtnSubmit_Click(sender As Object, e As EventArgs) Handles BtnSubmit.Click 'evaluates the answer and displays the next question If queNumber Proverbs.Length Then LblQuestion.Text = Proverbs(queNumber) Else If Score = 7 Then MessageBox.Show("Perfect") ElseIf Score > 4 Then MessageBox.Show("Excellent") Else MessageBox.Show("You might consider taking Psychology 101") End If Score = 0 queNumber = 0 LblQuestion.Text = Proverbs(queNumber) End If End If End Sub

Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click Me.Close() 'To close form End Sub

End Class

image text in transcribed

The Code works, I just don't know how to get this Take Quiz Button to show up and be the first and only thing.

Instructions The table below contains seven proverbs and their truth values. Write a program that represents these proverbs one at a time and asks the user to evaluate them as true or false. The program should then tell the user how many questions were answered correctly and display one of the following evaluation: Perfect (all correct), Excellent (5 or 6 correct), You might consider taking Psychology 101 (less than 5 correct) Seven Proverbs Proverb The squeaky wheel gets the grease Giving is better than receiving Opposite attract. Spare the rod and spoil the child Actions speak louder than words Flattery will get you nowhere Marry in haste, repent at leisure Truth Value True True False False True False True The initial form could contain a simple button: Proverbs Take Quiz Then you can start displaying the proverbs and asking for user's answer... Instructions The table below contains seven proverbs and their truth values. Write a program that represents these proverbs one at a time and asks the user to evaluate them as true or false. The program should then tell the user how many questions were answered correctly and display one of the following evaluation: Perfect (all correct), Excellent (5 or 6 correct), You might consider taking Psychology 101 (less than 5 correct) Seven Proverbs Proverb The squeaky wheel gets the grease Giving is better than receiving Opposite attract. Spare the rod and spoil the child Actions speak louder than words Flattery will get you nowhere Marry in haste, repent at leisure Truth Value True True False False True False True The initial form could contain a simple button: Proverbs Take Quiz Then you can start displaying the proverbs and asking for user's

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

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions

Question

8. Providing support during instruction.

Answered: 1 week ago