Vous êtes sur la page 1sur 7

Rahman Malik

PROGRAM ONE: UCAS CALCULATOR

SECTION ONE: ANALYSIS AND DESIGN

The purpose of this program is to calculate the overall grade of a student and also how
many UCAS points they have achieved. There are three buttons of the achievable
grades, pass merit or distinction, the students receive twelve overall grades and they
simply click on the relevant buttons in order to find out their overall grade and UCAS
points. This program also has an intro screen which allows the user to first choose
their course which includes: BTEC first certificate, BTEC national award and BTEC
national diploma. Below is a screenshot of the layout of the intro screen and the form:
Rahman Malik

As you can see above is the layout of my intro screen and form. The form consists of
seven labels, four buttons and a status bar. I will now provide a screenshot of the
properties of this form below:
Rahman Malik

Above are the properties of the form. I will now describe some of its properties in
more detail and explain what I have declared them as.

SECTION TWO: CODE AND IMPLEMETATION OF


APPLICATION
Rahman Malik

Below I will provide you with the actual program code then go on to discuss what
variables were declared and why:

Private Sub CmdPass_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CmdPass.Click
PassUnitPoints = 6

GradeBoundaryPoints = GradeBoundaryPoints + PassUnitPoints

UCASPass = UCASPass + 1

UnitCounter = UnitCounter + 1

TrBStatus.Value = TrBStatus.Value + 1

If TrBStatus.Value = 12 Then

CmdPass.Enabled = False

CmdMerit.Enabled = False

CmdDistinction.Enabled = False
End If

LblPass.Text = UCASPass & "Passes"

LblBoundarypoints.Text = GradeBoundaryPoints & "Grade


Boundary Points"
End Sub

Private Sub CmdMerit_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles CmdMerit.Click
MeritUnitPoints = 12

GradeBoundaryPoints = GradeBoundaryPoints + MeritUnitPoints

UCASMerit = UCASMerit + 1

UnitCounter = UnitCounter + 1

TrBStatus.Value = TrBStatus.Value + 1

If TrBStatus.Value = 12 Then

CmdPass.Enabled = False

CmdMerit.Enabled = False

CmdDistinction.Enabled = False
End If

LblMerit.Text = UCASMerit & "Merits"

LblBoundarypoints.Text = GradeBoundaryPoints & "Grade


Boundary Points"
End Sub
Rahman Malik

Private Sub CmdDistinction_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles CmdDistinction.Click
DistinctionUnitPoints = 18

GradeBoundaryPoints = GradeBoundaryPoints +
DistinctionUnitPoints

UCASDistinction = UCASDistinction + 1

UnitCounter = UnitCounter + 1

TrBStatus.Value = TrBStatus.Value = 1

If TrBStatus.Value = 12 Then

CmdPass.Enabled = False

CmdMerit.Enabled = False

CmdDistinction.Enabled = False
End If

LblDistinction.Text = UCASDistinction & "Distinction"

LblBoundarypoints.Text = GradeBoundaryPoints & "Grade


Boundary Points"
End Sub

Private Sub CmdCalculate_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles CmdCalculate.Click
If GradeBoundaryPoints >= 108 And GradeBoundaryPoints <= 131
Then

LblGrade.Text = "Overall Grade PPP"

LblPoints.Text = "120 UCAS Points"

ElseIf GradeBoundaryPoints >= 132 And GradeBoundaryPoints <=


155 Then

LblGrade.Text = "Overall Grade MPP"

LblPoints.Text = "160 UCAS Points"

ElseIf GradeBoundaryPoints >= 156 And GradeBoundaryPoints <=


179 Then

LblGrade.Text = "Overall Grade MMP"

LblPoints.Text = "200 UCAS Points"

ElseIf GradeBoundaryPoints >= 180 And GradeBoundaryPoints <=


203 Then

LblGrade.Text = "Overall Grade MMM"

LblPoints.Text = "240 UCAS Points"

ElseIf GradeBoundaryPoints >= 204 And GradeBoundaryPoints <=


227 Then
Rahman Malik

LblGrade.Text = "Overall Grade DMM"

LblPoints.Text = "280 UCAS Points"

ElseIf GradeBoundaryPoints >= 228 And GradeBoundaryPoints <=


251 Then

LblGrade.Text = "Overall Grade DDM"

LblPoints.Text = "320UCAS Points"

LblGrade.Text = "Overall Grade Fail"

ElseIf GradeBoundaryPoints >= 252 And GradeBoundaryPoints <=


324 Then

LblGrade.Text = "Overall Grade DDD"

LblPoints.Text = "360UCAS Points"

LblGrade.Text = "Overall Grade Fail"

End If
End Sub
End Class

Above is the actual program code for my application and I will now explain what
variables I have declared:

Above are the declared variables for my application. The reason these variables are
declared is because they are used to store values. These values will then be used
throughout my code as can be seen in my actual program code. Without these
variables my code will then end up with errors and the program not working.
Rahman Malik

SECTION THREE: TESTING

I will now represent a testing table and this to ensure that all my buttons etc do what
they are supposed to be doing. The testing table will consist of the following
headings:

• Test
• Test Data Used
• Expected Output
• Actual Output
• Test Result

TEST TEST DATA EXPECTED ACTUAL TEST RESULT


USED OUTPUT OUTPUT
CmdPass Allows user to Allowed user Works correctly
enter amount of to enter pass
pass grades grades
CmdMerit Allows user to Allowed user Works correctly
enter amount of to enter merit
merit grades grades
CmdDistinction Allows user to Allowed user Works correctly
enter amount of to enter
distinction grades distinction
grades
TrBStatus Shows status of Showed status Works correctly
grade of grade
CmdCalculate Calculates user’s Calculated Works correctly
total grades users total
grades

Vous aimerez peut-être aussi