1,105,263 Community Members

Help With this Question Visual Basic

Member Avatar
forjustincase
Newbie Poster
23 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Students Details and Mark Entry Form
Input : Number of students, Student Name , Student Id, 5 subject marks entered through inputbox by using dynamic array
Output: List of all input

Students Grade Form
Input: -
Output : List of students Name, ID, 5 subjects, Average, Grade

Students Grade Analysis
Input: -
Output : List of Grades and number of students achieved the grades.

Students Performance Analysis
Input: -
Output : List of highest and lowest performer

Need to use a proper Exception handling and Validation for the system

Member Avatar
BitBlt
Practically a Posting Shark
895 posts since Feb 2011
Reputation Points: 442 [?]
Q&As Helped to Solve: 163 [?]
Skill Endorsements: 16 [?]
Featured
 
0
 

Is there an actual question here? It just looks like you're asking someone to do your homework for you.

If you have tried to code something and are having trouble, post your code and your question and we will be happy to help.

Otherwise, please do your own homework.

Member Avatar
forjustincase
Newbie Poster
23 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Im stuck at the question List of Grades and number of students achieved the grades.

I cant seem to get the analysis to work. Would you mine helping me to correct the code.

Heres my code:-

Public Class Students_Grade_Analysis

Private Sub Students_Grade_Analysis_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Dim ArrGrade() As String
    Dim HowMany As Integer
    Dim Y As Integer
    Dim Count1 As Integer
    Dim Count2 As Integer
    Dim Count3 As Integer
    Dim Count4 As Integer
    Dim Count5 As Integer


    HowMany = InputBox("How Many Grades Do You Want To Enter?")
    HowMany = HowMany - 1

    ReDim ArrGrade(HowMany)

    For Y = 0 To HowMany
        ArrGrade(Y) = InputBox("Please Enter a Grade")

        If ArrGrade(Y) = "A+" Or ArrGrade(Y) = "a+" Then
            Count1 = Count2 + 1
        ElseIf ArrGrade(Y) = "A" Or ArrGrade(Y) = "A" Then
            Count2 = Count2 + 1
        ElseIf ArrGrade(Y) = "B" Or ArrGrade(Y) = "b" Then
            Count3 = Count3 + 1
        ElseIf ArrGrade(Y) = "C" Or ArrGrade(Y) = "c" Then
            Count4 = Count4 + 1
        Else : ArrGrade(Y) = "D" Or ArrGrade(Y) = "D"
            Count5 = Count5 + 1
        End If
    Next
    GradesLabel.Text = Count1
    StudentsGradeLabel.Text = Count2
End Sub

End Class

Member Avatar
srkv03
Newbie Poster
13 posts since Jul 2012
Reputation Points: 12 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 
  1. If ArrGrade(Y) = "A+" Or ArrGrade(Y) = "a+" Then
  2. Count1 = Count2 + 1
    Should this not be count1 = count1 + 1?
    Also you cannot use one label to display all the student with the grade you will need 5 different labels referencing each counter.
    Something like
    GradeAPlus.Text = Count1
    GradeA.Text = Count2
    GradeB.Text = Count3
    GradeC.Text = Count4
    GradeD.Text = Count5
Member Avatar
forjustincase
Newbie Poster
23 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

ok thanks program fixed

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article