1. Fibonacci Series Program In Vb
  2. Vb Projects With Source Code
  3. Sample Program In Vb 6.0
  4. Palindrome Program In Vb
27 Aug 2002

Building a Simple Quiz. Author Chris Coyier. Go to Comments Published. Basic program. March 25, 2009. Permalink to comment # Soh Tanaka. What I hate about this quiz the most is that it reminds me how long IE6 has been around and I still have to code for it. March 25, 2009. Permalink to comment # Bob. Free source code and tutorials for Software developers and Architects.; Updated: 14 Jan 2014. 13,828,636 members. How to make quiz in visual basic. Rate this: Please Sign up or sign in to vote. I am developing a very simple VB program to do just that. Once finished, I can send it to you just for your info. Felosoro has submitted 1 source code / articles. If you like this post, you can follow SourceCodester on Twitter. Subscribe to SourceCodester feed via RSS or EMAIL to receive instant updates. Online Quiz System project is a web application which is implemented in Java platform.Online Quiz System Java Project tutorial and guide for developing code. Entity–relationship(er) diagrams,Data flow diagram(dfd),Sequence diagram and software requirements specification (SRS) of Online Quiz System in report file.

Create a multiple-choice quiz using XML DOM and XPath

Introduction

The idea to write an online quiz came up when I was looking for an XML tutorial. I visited W3Schools.com and found not only the tutorial I was looking for, but more interestingly was an online quiz. I took the 20-questions quiz once, and hey! I felt great about it. I wonder why there are just few web sites offering online quiz like that.

A quiz is a great way to test your knowledge. An online quiz is a great addition to your web site that could keep your visitors glued for a few more minutes.

Download the demo project and try it. It is a 10-question quiz to challenge your knowledge about Australian geography. Don't worry! All data is kept in a clear, human-readable XML document, so you could easily peek for answers.

The Script Explained

I will not go through a very detail discussion about the script, but rather highlight several areas in the script. Once you get the whole idea about the script, then it is easy to modify or extend the script to suit your requirements.

Recursive Script

There is only one aspx script to do various tasks in the online quiz. It is a recursive script: a script that 'calls' itself over and over again until a certain condition is reached. Precisely, the script does not call itself, but posts form data to itself. This process is known as post back.

As the script posts back to itself continuously over the duration of the quiz, we could say that it has many states. The first state is to initialize several essential variables, count the total question, and record the quizstart time. Then, in the first and each following state, the script displays a multiple choice question to challenge user (see the snapshot above). A user answering the question will trigger onClick event, forcing a post-back, and move the script to the next state. In the next state, the script will run a subroutine associated with the event to check the answer and display the next multiple question. The recursive flow repeats again and again, until the last question is processed, where at this point a result is displayed.

The following activity diagram represents the recursive flow of the online quiz script.

Maintaining State

The online quiz script needs to maintain state of its variables. There are a bunch of alternatives to do so. The most advanced way is to use the session object, and the conventional way is to use hidden inputs or a QueryString. ASP.NET introduces another alternative called 'state bag'. Unlike the session object, state bag is not persisted over the whole user session, but is brought forward from one page to another page just like hidden inputs and querystring. However, it is superior to hidden inputs and QueryStrings, since it can accept more data typesand the content has been encoded into a single string and therefore is not easy to tamper with.

Storing value into state bag:

Getting value from state bag:

The following is a list of variables to be kept in the state bag:

Variable NameState Bag NameData TypeComments
intTotalQuestionTotalQuestionintKeeps the total question in the quiz. The value is populated in the first state of the quiz and remains constants over the duration of quiz.
intScoreScoreintKeeps the number of correct answer.
intQuestionNoQuestionNointHolds the last question number the user attempted.
arrAnswerHistoryAnswerHistoryarraylist of intRecords answers in the quiz. It will record 0 (zero) if the answer is correct, otherwise record the selectedindex of the radio buttons.
(none)CorrectAnswerintHolds the correct answer of previous question. It is made available in the next state when the answer is checked for correctness.
(none)StartTimedateHolds the start time of the quiz. It is used to calculate the time spent in the quiz.

XML Data

Data for the online quiz is kept in an XML document named quiz.xml, which is validated using an XML schema named quiz.xsd. A valid XML document consists of a root element called quiz, which has at least one element called mchoice (short for multiple-choice). Each mchoice element has one question child element, and two or more answer child elements. The answer element may have the correct attribute with possible value of either yes or no. In fact, you should supply the correct attribute with a value of yes to one of the answers in the same mchoice, otherwise there will be no correct answer for the question.

quiz.xml:

It is possible to insert HTML tags within the XML data, therefore the quiz may contain decorated texts, images, links, etc. instead of plain text. Just make sure to enclose the HTML tags with CDATA block, so the XML document is still valid. Look at the following example:


quiz.xsd:

The online quiz script does not validate the XML document against the XML Schema for several reasons. First, it is a resource intensive process, forcing

to go through each element and attribute in the XML document. Second, we need to validate the XML document just once after it has been updated, instead of every time we load the file. To validate the XML document, you could write a separate aspx script or use a third-party tool and run them manually every after you finish updating the XML document.


XML Document Object Model

XML Document Object Model (DOM) is a tree-like structure that represents every node of an XML document based on the hierarchical relationship with its parent nodes and child nodes. The DOM allows us to navigate and manipulate XML documentin more logical way.

To build an XML DOM, we use the XMLDocument class. The XMLDocument class itself extends the XMLNode class, therefore many of its properties and methods are inherited from XMLNode. While XMLNode's methods and properties apply to a specific node in an XML document, methods and properties of XMLDocument apply to the whole XML document.

The following code create an instance of XMLDocument and build XML DOM from quiz.xml:

Addressing a specific node in the XML DOM is a bit tricky. We should navigate our 'pointer' through the DOM starting from its root node. The following code demonstrates how to address the first question of the first multiple choice:

It is definitely a tedious task, particularly if you want to address nodes located at a very low level in the hierarchy. Luckily, we can utilize the XPath language to more directly address a specific node or a group of nodes. If you are unfamiliar with XPath, it will be briefly explained in the next section.

The SelectNodes method of the XMLNode and XMLDocument class' accepts an XPath string and returns a collection of XMLNode objects, called

. Another method, SelectSingleNode, does just the same thing but return only a single XMLNode object.


XPath

XPath is a language to address specific nodes in an XML document. It could address a single node or a group of nodes by describing its hierarchy relationship in a string, therefore it is often called an XPath string. If you are familiar with file path or URL, then the concept of XPath is nothing new.

Read the XPath string from left to right and you will be able to figure out the node it is addressing. Except for several conditions and functions, XPath is actually easy to use. The following table demonstrates some usage of XPath against quiz.xml:

XPath StringResult
/quizSelect the root node of XML including all elements it contains.
/quiz/mchoiceSelect all mchoice child elements of the quiz
/quiz/mchoice[1]Select the first mchoice (multiple choice) child element of the quiz
/quiz/mchoice[1]/questionSelect all questions of the first multiple choice of the quiz
/quiz/mchoice[1]/answer[4]Select the fourth answer of the first multiple choice of the quiz
/quiz/mchoice[1]/answer[4]/@correctSelect 'correct' attribute of the fourth answer of the first multiple choice of the quiz

XPath contains a lot more surprises. If you are interested enough to explore more, check out the XPath Tutorial at W3CSchools.

Phishing is the other most commonly used technique to hack email passwords. This method involves the use of Fake Login Pages (spoofed webpages) whose look and feel are almost identical to that of legitimate websites. Fake login pages are created by many hackers which appear exactly as Gmail or Yahoo login pages. How to Hack in to Yahoo Email without Password [Update] How to Hack Emails on Android Phone (Must Know) Email hacker is a hacking tool that is mainly designed to hack Email including Gmail, Yahoo, Hotmail, and much more. Messenger Password' option and click 'Next' to crack your Yahoo mail password now. Step 3 Hack Yahoo mail password Now you can hack Yahoo password according to. Other Ways To Hack Yahoo Password. The other most commonly used trick to hack Yahoo password is by using a fake login Page (also called as Phishing). Today, phishing is the most widely used technique to hack Yahoo password. A fake login page is a page that resembles the login pages of sites like Yahoo, Gmail, Facebook etc. Hack yahoo email id password.

Oct 14, 2012  Can anyone supply me with this keygen, so that I may save money and output the codes myself? Aug 22, 2012 #2. Aug 22, 2012 #2. Turbine said: I have a private prepaid electricity meter. The front of the meter. Electricity key prepayment meter Buying credit Depending on where you live, as an npower electricity prepayment customer. Prepaid Meter Keygen, Dvd X Player 5.5 Professional Keygen, starcraft original cd keygen. I have a private prepaid electricity meter in one of our properties. Private Pre-Paid Electricity Meter KeyGen? Hacking the prepaid electricity service want ho hack ur electricity meter? I've scrached my head for a while right now trying to figure out how this thing works. The meter itself has no much significance since by default, it sends no electricity to ur house and if any wire connected to this meter is cut, the electricity goes off. Prepaid meter keygen software. Free download key generator for a prepaid meter Files at Software Informer. OneLoupe also displays pixels, Prepaid Meter Keygen real-time mode on and off. Prepaid Meter Keygen; - Download Mainstage For Pc. Free prepaid energy meter downloads - Collection of prepaid energy meter freeware.

Conclusions

This article presented an online quiz as a tool to add interactivity to your web site. It also explored several topics like recursive scripts, navigating and manipulating XML documents using the XML DOM, a glimpse of the XPath language, and a brief discussion about state maintenance.

Links

HomeCreateQuizzesComputerProgrammingVisual Basic
A comprehensive database of more than 49 visual basic quizzes online, test your knowledge with visual basic quiz questions. Our online visual basic trivia quizzes can be adapted to suit your requirements for taking some of the top visual basic quizzes.
How fluent are you in computer languages? Do you know enough to recognize that Visual Basic is a special computer language? Are you willing to put your knowledge and language skills to test by taking these quizzes? Impress all your family and friends with your computer software and language knowledge and take these quizzes today.
What is Visual Basic? Who developed the Visual Basic computer language? When was Visual Basic first released? What was Visual Basic derived from? What does this computer language allow programmers to do? What was Visual Basic designed to accommodate? What are Active X Controls? Make Alan Cooper proud and show off your computer knowledge today!

Related Topics

Others:Visual Basic FlashcardsVisual Basic Questions & Answers

  • Which is the correct option here?Create keyboard access on an object by ______________ in the Text property.
    Which is the correct option here?Create keyboard access on an object by ______________ in the Text property.
    Wat? I don't get what this is trying to ask. Can someone please give me a MSDN reference link for this?

  • How do you limit implicit type conversion in VB.NET?
    How do you limit implicit type conversion in VB.NET?
    The correct answer to this question is A, Option Strict On. This is a feature of Microsoft Visual Basic. Option Strict is not on by default. In this statement, data type conversions are restricted to only widening conversions. In use, Option Strict must appear before any other code.Once activated, data can be converted into other data, but through this data can also be loss. Error messages can also be generated with Option Strict. These errors include having a variable which can't be declared or late blinding. When these errors occur, Option Strict On checks for the various conditions that could cause the errors.

  • What will be the result of the following statement ? SELECT ROUND (689.89, -1, 1)
    What will be the result of the following statement ? SELECT ROUND (689.89, -1, 1)

  • What are Declaration statements?
    Give variables and constants names, and specify the type of data they will hold Answer: C Page: 97 Objective: 1

  • What is the significance of Shadowing a method in VB.Net ?
    What is the significance of Shadowing a method in VB.Net ?
    It replaces all the implementation from high in the inheritance chain

  • Which of the following is a valid statement that can be used to declare a local variable that will store fractions?
    Which of the following is a valid statement that can be used to declare a local variable that will store fractions?
    Dim decIndex As Decimal Answer: C Page: 102 Objective: 4

  • What will be the value of indexInteger after execution of these statements? For indexInteger = 1 to 10 Step 2 valueInteger = += indexInteger Next..
    What will be the value of indexInteger after execution of these statements? For indexInteger = 1 to 10 Step 2 valueInteger = += indexInteger Next..

  • What is the value of intMystery when the following statements are executed? Const intNUMBER As Integer = 10 Select Case intNUMBER Case 1, 3, 5, 7, 9 ..
    What is the value of intMystery when the following statements are executed? Const intNUMBER As Integer = 10 Select Case intNUMBER Case 1, 3, 5, 7, 9 ..

  • What will be the value of totalInteger after execution of this statement? Assume that valueInteger = 2. totalInteger= ((valueInteger + 2) * (valueInteger + 4)) / valueInteger..
    What will be the value of totalInteger after execution of this statement? Assume that valueInteger = 2. totalInteger= ((valueInteger + 2) * (valueInteger + 4)) / valueInteger..

  • Using the order of precedence and the formula below, what is answerInteger if: numberOneInteger=2, numberTwoInteger=12, numberThreeInteger=20, and numberFourInteger=6 ..
    Using the order of precedence and the formula below, what is answerInteger if: numberOneInteger=2, numberTwoInteger=12, numberThreeInteger=20, and numberFourInteger=6 ..

  • What will be the value of totalInteger after execution of this statement? Assume that valueInteger = 2. totalInteger= ((valueInteger + 2) * (valueInteger + 4)) / valueInteger..
    What will be the value of totalInteger after execution of this statement? Assume that valueInteger = 2. totalInteger= ((valueInteger + 2) * (valueInteger + 4)) / valueInteger..

  • Which of the following is NOT a rule for naming identifiers?
    Which of the following is NOT a rule for naming identifiers?
    Identifiers should use periods to separate words Answer: B Page: 98 Objective: 3
‹›
Are you a programmer? Do you love to write codes? If yes then take this Visual Basic quiz. Visual Basic is an event-driven programming language made by Microsoft, released in 1991. It's simple to learn, write code and enables..
  • Visual Basic was developed in what year?

It is a 20 points quiz about introduction to object oriented programming in VB.NET.
  • It is an OOP language that is organized around objects rather than actions, and data rather than logic.

Those of you studying computer science might be scratching your heads when coming to grips with open source web frameworks like ASP.NET and database programming languages like SQL, but this basic quiz will help show you the..
  • ASP.NET is a _________________________ ?

This is a quiz for all the nerds out there. If you want to test your knowledge on this particular bunch of networking language facts take this quiz and find out how vast your knowledge is.
  • _________ are objects on a form

This is a quiz for all the programmers who think they are masters in the field. Test your knowledge on using this particular bunch of programming language facts in this quiz and find out how vast your knowledge is.
  • It contains standard Visual Studio commands. These generally manipulate the current solution and the modules it contains, although you can customize the menus as needed.

This is a quiz for all the programmers and nerds out there. If you want to test your knowledge on this particular bunch of programming language facts take this quiz and find out how vast your knowledge is.
  • What object do you use when creating a form with choices where a user can only choose one answer?

This quiz will test you on Visual Basic Session 1. This quiz will test you on how to create a new project, how to build the application how change the application title, how to add and update a label.
  • What main menu do you click to create a new project?

This quiz will test your knowledge on creating and using windows forms in Visual Basic.
  • How many forms are created by default when you create a windows application in Visual Basic 2005 or above?


Terminology and procedures after completing of Web Browser Project.
  • Graphic User Interface.

This is your description.
  • You are creating an MVC application for a retail store website. You are defining a route that users can access to find stores in the United States that have a specific ZIP Code. You expect users to request URLs that include the five-digit ZIP Code, such as http://contoso.com/Store/Find/06385. You define the route as shown in the following code example.routes.MapRoute( 'StoreFind', 'Store/Find/{zipCode}', new { controller = 'Store', action = 'Find' });You need to modify the route so that the application returns an 'HTTP Error 404 - File Not Found' error message when a user enters an invalid URL.Which code segment should you use?

  • You are unsure if a country is considered a 'sanctioned country'. You should screen this country in Visual Compliance to determine if it is a sanctioned country.

  • What will be the value of answerInteger after execution of the following line of code? Assume that numberAInteger = 6, numberBInteger = 4, numberCInteger = 2 answerInteger = (numberAInteger + numberBInteger) * (numberAInteger / numberCInteger)

  • _______ can be used when two subscripts are needed to identify tabular data, such as when data is arranged in rows and columns.

  • When creating menus with the MenuStrip component, the Name property is used to hold the words that will appear on the screen in the menu bar.

  • In an If statement, when the condition is true, _______.

  • If the programmer does not write code for a button control, Visual Basic automatically provides code in the Click procedure that will close the form when the user clicks the button.

  • The ______ symbol is used for concatenation.

Variables, Constants, and Calculations
  • When you declare a variable or a named constant, Visual Basic reserves an area of memory and assigns it a name called a(n) _______.

  • If a project runs without a syntax error, you can be certain that the code has performed the project's task correctly.

Assessment of Photoshop Skills Unit Terms
  • ____________ is the range of color.

Quiz program in vb source codes
VB Express Terminology
  • What property for a label allows you to freely resize the label?

For my third year students. Mcs
  • This signifies the end of our code.

Study the RandomNumber.frm code and its output first. Use your answers that you put on paper from the assignment. After you are finished, read the corrections and the explanations that go with them. ..
  • When you run your RandomNumber.frm program, do you get the same exact results as the example shown on the direction sheet?

Please Fill the answers for all Questions
  • Which Namespace is used for DataTable Class?

Test your basic knowledge of ASP.NET.
  • The .NET Framework provides a runtime environment called... ?

Fibonacci Series Program In Vb


Microsoft ASP.NET Quiz
  • Which of the following languages can be used to write server side scripting in ASP.NET?

  • It allows the programmer to alter the normal flow of statement execution.

  • A high level programming language evolved from the earlier DOS version called BASIC.

Vb Projects With Source Code


Sample Program In Vb 6.0

Quiz
This is a simple quiz for an overview of GUI programming
  • What is the area we can create variables called?

Palindrome Program In Vb


d3nho.netlify.com – 2018