Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi there, newbie here. i just dont know where to start after finishing with the interface. how do i save the combo box in database and then, insert the value for every answer before calculating the final marks for the question below. please help me walk through the solution. every help is deeply appreciated. :((((

Question

Radar Chart Application
How great are you?

Language
1. English
2. Arabic
3. Malay
4. Mandarin
5. Spanish

Science
1. Physics
2. Chemistry
3. Biology

Programming
1. VB
2. C#
3. C++
4. HTML

Answer should be dropdown of;
- I know nothing > carry 0 mark
- I know something > carry 1 mark
- I know quite a lot of things > carry 2 mark
- I know everything > carry 3 mark
- I never knew about the subject > special case
The total marks will be average of answer for every subject. For example,

Language
English I know everything
Arabic I know something
Malay I know everything
Mandarin I know nothing
Spanish I never knew about the subject
Science
Physics I know everything
Chemistry I know something
Biology I know something
Programming
VB I never knew about the subject
C# I know quite a lot of things
C++ I know quite a lot of things
HTML I know nothing

So the marks will be calculated as follows,
For Language, (3+1+3+0)/4= 7/4
For Science, (3+1+1)/3=5/3
For Programming, (2+2+0)/3=4/3
*note that the Spanish and VB carry no value and discarded from the average calculation.

Create a VB application as an interface using Access database to show result as stated below.

ok so i cant put an image here. here is the link for the result
http://2.bp.blogspot.com/-9wZQvoeDM-Y/VYe9PzRsleI/AAAAAAAABKg/8jMSuBGIBuA/s1600/answer.PNG[^],
and my work done as for now.http://4.bp.blogspot.com/-PaBG42euaWw/VYe9PwOhdFI/AAAAAAAABKc/2dzyPscptho/s1600/Capture.PNG[^]
please comment and provide me with your expertise, thank you very much :D


so ive done the calculation for radar chart, but it doesnt work out for special case.

VB
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim num_language As Integer = 5
        Dim value As Integer
        Dim total As Integer = 0
        Dim final As Double = 0

        'english

        If ComboBox1.SelectedIndex = 0 Then
            value = 0
        ElseIf ComboBox1.SelectedIndex = 1 Then
            value = 1
        ElseIf ComboBox1.SelectedIndex = 2 Then
            value = 2
        ElseIf ComboBox1.SelectedIndex = 3 Then
            value = 3
        Else
            num_language = num_language - 1
        End If



        total = total + value   'total english



        'arabic

        If ComboBox2.SelectedIndex = 0 Then
            value = 0
        ElseIf ComboBox2.SelectedIndex = 1 Then
            value = 1
        ElseIf ComboBox2.SelectedIndex = 2 Then
            value = 2
        ElseIf ComboBox2.SelectedIndex = 3 Then
            value = 3
        Else
            num_language = num_language - 1
        End If



        total = total + value     'english+arabic




        'malay

        If ComboBox3.SelectedIndex = 0 Then
            value = 0
        ElseIf ComboBox3.SelectedIndex = 1 Then
            value = 1
        ElseIf ComboBox3.SelectedIndex = 2 Then
            value = 2
        ElseIf ComboBox3.SelectedIndex = 3 Then
            value = 3
        Else
            num_language = num_language - 1
        End If



        total = total + value     'english+arabic+malay




        'mandarin

        If ComboBox4.SelectedIndex = 0 Then
            value = 0
        ElseIf ComboBox4.SelectedIndex = 1 Then
            value = 1
        ElseIf ComboBox4.SelectedIndex = 2 Then
            value = 2
        ElseIf ComboBox4.SelectedIndex = 3 Then
            value = 3
        Else
            num_language = num_language - 1
        End If


        total = total + value     'english+arabic+malay+mandarin


        'spanish

        If ComboBox5.SelectedIndex = 0 Then
            value = 0
        ElseIf ComboBox5.SelectedIndex = 1 Then
            value = 1
        ElseIf ComboBox5.SelectedIndex = 2 Then
            value = 2
        ElseIf ComboBox5.SelectedIndex = 3 Then
            value = 3
        Else
            num_language = num_language - 1
        End If


        total = total + value     'english+arabic+malay+mandarin+spanish

        final = total / num_language

        MsgBox(final)

    End Sub




End Class


the answer should be calculated as stated above where the value for special case will be discarded from the calculation of average. instead i got answer like everything is divided by 3.2 and i dont know where it came from.
Posted
Updated 23-Jun-15 15:26pm
v3

1 solution

We don't do homework. There are several reasons for this but they are all for your benefit.

Give it a go. Get started. Write some code. If you get stuck and have a specific question then let us know.

If you have some code, post it and show us where you are stuck. We will help you find resources but you should research them yourself first.

This looks like a good resource to get you started
http://www.tutorialspoint.com/vb.net/vb.net_database_access.htm[^]

There are many types of database you can use. You should let us know in the question which you use as each is handled slightly differently.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900