The Student Room Group

Higher Computing Coursework Task Help

Scroll to see replies

Reply 100
got it working.
(edited 12 years ago)
Reply 101
In part two of the coursework it say you need a graphics card with:
"Two outputs from HDMI, DVI and displayport"... does this mean two outputs of each kind (eg. 2 HDMI, 2 DVI and 2 Displayport) or just any two of the three?
Reply 102
Original post by 062102314
In part two of the coursework it say you need a graphics card with:
"Two outputs from HDMI, DVI and displayport"... does this mean two outputs of each kind (eg. 2 HDMI, 2 DVI and 2 Displayport) or just any two of the three?


Any two out of the three.
Reply 103
Oh thank goodness! I was struggling to find any graphics cards with 2 of each port...
Reply 104
Attribute VB_Name = "Module1"
'Graham Balfour 406634

Option Explicit

Dim crashlevel As String
Dim i As Integer
Dim strSubstr(10) As String
Dim noofa As Integer
Dim noofb As Integer
Dim noofc As Integer
Dim noofd As Integer
Dim noofe As Integer
Dim nooff As Integer
Dim message As String


Sub main()
Call inputlevels
Call splitinput
Call display
End Sub

Sub inputlevels()
'repeat until lenth of sting is 10
Do
crashlevel = InputBox("Please enter crash levels")
Loop While Not (Len(crashlevel) = 10)
End Sub
'Split the string to check each letter
Sub splitinput()
'change letter to upper case
crashlevel = UCase$(crashlevel)
For i = 1 To 10
strSubstr(i) = Mid$(crashlevel, i, 1)
Call valletter
Next i
End Sub
'check if letters are between A and F
Sub valletter()
If (strSubstr(i) = "A") Then
noofa = noofa + 1
ElseIf (strSubstr(i) = "B") Then
noofb = noofb + 1
ElseIf (strSubstr(i) = "C") Then
noofc = noofc + 1
ElseIf (strSubstr(i) = "D") Then
noofb = noofa + 1
ElseIf (strSubstr(i) = "E") Then
noofe = noofe + 1
ElseIf (strSubstr(i) = "F") Then
nooff = nooff + 1
Else
Call reenterchar
End If
End Sub
'Incase one of the characters is wrong
Sub reenterchar()
strSubstr(i) = InputBox("Please re-enter the " & i & " letter")
strSubstr(i) = UCase$(strSubstr(i))
Call valletter
End Sub


Sub display()
message = ("A = " & noofa & vbCr & "B = " & noofb & vbCr & "C = " & noofc & vbCr & "D = " & noofd & vbCr & "E = " & noofe & vbCr & "F = " & nooff & vbCr)
MsgBox (message)
End Sub
Reply 105
If you're using a language that has predefined functions, such as a regex function, is it okay to use them?
Reply 106
I need help with my code


Public Class User_Interface
Dim crashes As String
Dim stvSub(10) As String
Dim Counter(6) As Integer
Private Sub Button_Click() Handles Button.Click
Call Stage_1(crashes)
Call Stage_2(stvSub, Counter)
Call Stage_3()


End Sub
Private Sub Stage_1(ByVal crashes)
crashes = InputBox("Enter 10 Values between A-F") 'When the button is clicked the user must enter 10 values betwwen A to F only'

End Sub
Private Sub Stage_2(ByVal stvSub, ByVal Counter)
Dim Entry As Boolean

Entry = True
For Counter = 1 To 10
crashes = LCase$(Entry)
crashes = Mid$(crashes, Counter, 1)


Select Case stvSub(Counter)
Case Is = "a"
Entry = True
Case Is = "b"
Entry = True
Case Is = "c"
Entry = True
Case Is = "d"
Entry = True
Case Is = "e"
Entry = True
Case Is = "f"
Entry = True
Case Else
Entry = False
MsgBox("Error")


End Select
Next




End Sub
Private Sub Stage_3()
Dim max_crashes As Integer
Dim Index As Integer



max_crashes = Counter(6)
For Index = 1 To 6
If Counter(Index) > max_crashes Then
max_crashes = Counter(Index)
End If
Next
List.Items.Add(" ")
List.Items.Add("The Level That Crashed-")

'For Index = 1 To 10
If Counter(Index) = max_crashes Then
List.Items.Add(Chr("a" + Index))
List.Items.Add(Chr("b" + Index))
List.Items.Add(Chr("c" + Index))
List.Items.Add(Chr("d" + Index))
List.Items.Add(Chr("e" + Index))
List.Items.Add(Chr("f" + Index))
End If
' Next
End Sub

End Class





Its not finished but i just need to get it to display
Any help well be vert useful
I've finished the coding part (thankfully)


Ive almost finished the chosing suitable computer part


What two graphics cards and Led Monitors did you guys pick



Thanks
Original post by Lenina
If you're using a language that has predefined functions, such as a regex function, is it okay to use them?


Hi Lenina :smile:
Yes, it should be OK as those functions are included in order for you to implement a software solution. I'll presume that you've studied the seven-stage Waterfall methodology before (ADITDEM), and if my presumption is correct you would of, during the design phase, thought up the algorithms (or steps) that led you to decide which software development environment to use (I'm assuming that the SDE that you're using is perfectly apt for implementing the solution you have in mind).
Think of it this way, Visual Basic includes functions such as that for finding the square root of an integer (a finite number that has no exponent) or generating a random number (generating true random numbers in Computing is a other conversation for another place and time - however!). It is also possible to include libraries into a software development environment (such as the .h files for C) which can allow you to do such things such as creating a matrix or optimising a piece of software for a mobile phone (although you would have to have a special compiler program for that software to execute under your phone's operating system!)...
Anyway, my point is that there is no shame in using these pre-defined functions as they are there to help you implement the code which in turn becomes the piece of software that you wanted in the first place!! :smile: :smile:
Good luck !!
Original post by Sypher_IT
I need help with my code




'For Index = 1 To 10
If Counter(Index) = max_crashes Then
List.Items.Add(Chr("a" + Index))
List.Items.Add(Chr("b" + Index))
List.Items.Add(Chr("c" + Index))
List.Items.Add(Chr("d" + Index))
List.Items.Add(Chr("e" + Index))
List.Items.Add(Chr("f" + Index))
End If
' Next
End Sub

End Class





Its not finished but i just need to get it to display
Any help well be vert useful


Hi Sypher :smile:
It looks like you're using the event-driven programming language Visual Basic. I believe that if you substitute "List.Items.Add(Chr("a" + Index))" for "List1.AddItem(Chr("a" + Index))" then the string "a (ASCII equivalent of what the value of the integer "counter" is at this point in time)" will be added onto the list and therefore displayed. Is this what you wanted the software to do though? :smile: :smile:
Good luck !!

Quick Reply

Latest

Trending

Trending