I have to write a program that does this:
Create a program that encrypts and decrypts a message...
Inputs: A typed message
Output: When the encrypt button is clicked the input message is encrypted. When the Decrypt button is clicked, the message is decrypted.
the encrypted button is clicked...this adds 1 to the ASCII value of a letter; therefore, if the word "Hello" is typed into the textbox, the letters "Ifmmp" would be displayed in the encrypt text box. The Decrypt button reverses the process by subtracting 1 from the ASCII value.
Additional Info: The program should include encrypt message, decrypt message, clear and exit buttons. their functionality is as follows:
The encrypt message button takes the message button takes the message entered into the first textbox. It then breaks the message down into its individual letters and converts it to ASCII. Once that is done, it adds one to the ASCII value and displays it in the second textbox.
The code to declare a char array and store the values from the first textbox is as follows:
Dim chrArray(() As Char = txtMessage.Text.ToCharArray
You will use a For Next loop to process every letter in the message. You will use 0 for the lower bound and chrArray.GetUpperBound(0) for the upper bound.
You will use the chr() and asc() functions to find the next higher ASCII value. Chr(Asc(chrArray(intCount)) + )
Once the new ASCII value is found, display it in the second textbox.
The dexrypt message button takes the encrypted message in the second textbox. It then breaks the message down into its individual letters and converts it to the third textbox.
When the Clear button is clicked, the program should clear data out of all 3 textboxes.
When the Exit button is clicked, the program should terminate.
The program should use error handling and display a message box containing the following text "ID10T Error" when an error is encountered.
Comments should be used to document how the program functions.
Evaluation Criteria:
1) All labels, textboxes and command button display the correct cation
2) The listbox and command buttons names use proper Hungarian notation and camel casing
3) The exit button terminates the program
4) The sclear button clears all textbox data before any new data is added
5) The encrypt message button correctly encrypts the input message
6) The decrypt message button correctly decrypts the encrypted message
7) Error handling functions correctly
8) Comments are used to document processing
9) Message box functions correctly
10) All text data is converted to the appropiate type
Heres what I have so far.....
Expand|Select|Wrap|Line Numbers
- Public Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- Handles Button1.Click
- Dim strArray() As String + txtInput.Text.Split(",")
- Dim intHold As Integer
- Dim intX As Integer
- Dim intY As Integer
- Dim inArray(strArray.GetUpperBound(0)) As Integer
- For intCount As Integer = 0 To strArray.GetUpperBound(0)
- intArray(intCount) = CType(strArray(intCount), Integer
- Next
- 'sort
- For intX = 0 To intArray.GetUpperBound(0)
- For intY = 0 to intArray.GetUpperBound(0)
- If intArray(intX) < intArray(intY) Then
- intHold = intArray(intY)
- intArray(intY) = intArray(intX)
- intArray(intX) = intHold
- End If
- Next
- Next
- Dim strOutput As String = ""
- For Each strItem As String In strArray
- strOutput & ","
- Next
- txtOutput.Text = strOutput.Trim(",")
- Next
- End Sub
- End Class
Help me PLEASE>>>>
Angi Nelson
removed mail id