Android Combat--third-party service Bmob back-end Cloud answer system small Project (iv)

Source: Internet
Author: User

Third-party service Bmob back-end Cloud answer system small Project (iv)

In advance: All operations here are implemented after integration of BMOBSDK, if Bmob still do not know, please follow my first article Bmob article

Project Significance:

The project is simple and difficult to deal with is the button reuse effect of the choice question.

The project can update exam topics and test content in real-time, with high flexibility

Smart you may have found that the driver's license book the subject of the answer system and this very similar, and a question with an ad, this proceeds ... maybe the next dark horse is you.

Specific ideas:

1, the project can be divided into 3 pages to analyze: Select the question page, fill out the information page, start the exam page.

2, select the question page: from the Bmob backstage to obtain the exam table examination question information, through a GridView display, will select the question name to the next page.

3, fill out the information page: To obtain the user fill in the information and the last page passed down the name of the question, query the background grade table in the existence of this data, if there is, the notification has completed the examination, if not exist, then the data user information to the next page, into the Start test page

4. Start Examination page: Get the examtable data in exam table, corresponding query backstage question_x table, get exam questions, test start, record the time of the exam to sharepreference, and compare with the last Test time, If the test limit time is exceeded, the data is added to the background grade table if it is divided into 0 points. After the exam is completed, the calculation of a single topic score of 1 points, multi-choice score of 2 points, the total score added to the background scores data, the end of the exam.

Project Description:

Project:

Project Engineering structure diagram:

Structure of the Background database table: (Right-click the new tab to see a little clearer)

Step One: Introduction of JavaBean

Exam entity class:

Isexaming: Whether the exam has been closed
Examtable: Used to remove the background exam topic data sheet (backstage can have multiple problem library, as long as this field corresponds to the data table)

Fractional Statistics class:

Question Entity class:

Step two: Implementation of the answer logic

The first step: Define the variables and find the click events for the layout control and the bound control:
One is the top of the question, a topic content and four answer buttons, the next question and the previous button, a test item below the counter (9)

Step Two: Initialize the data:

Using the examination unique identification and examinee information to calculate the MD5, used as the test timing of the unique recognition, because there can be many kinds of examinations in the project, if not differentiated, will lead to timing errors, to ensure the accuracy and uniqueness of the timing.

Initialize the problem if time is not found in the timed

Step three: Handle Click events:

Fourth step: Calculate the score end test, the answer is according to A-1, B-2, C-3, D-4 and so on the corresponding relationship judgment, so on the index of the option +1

Fifth step: Record the last time of the exam when you close the exam, stop the timing

Sixth step: Other tool classes

Here is a file download link for this class, if you like, Examactivity class

http://download.csdn.net/detail/qq_30379689/9603112

Android Combat--third-party service Bmob back-end Cloud answer system small Project (iv)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.