Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this exercise, you modify the Password application from this chapter's Apply lesson. Use Windows to make a copy of the Password Solution folder. Rename

In this exercise, you modify the Password application from this chapter's Apply lesson. Use Windows to make a copy of the Password Solution folder. Rename the copy Password Solution-Advanced. Open the Password Solution.sln file contained in the Password Solution-Advanced folder. Before inserting the number, the btnCreate_Click procedure should alternate the case of each letter in the password. If the first character is lowercase, the procedure should change it to uppercase; it should then change the second letter to lowercase, the third letter to uppercase, and so on. For example, if the password is abcd, the procedure should change it to AbCd. On the other hand, if the first character is uppercase, the procedure should change it to lowercase and then alternate the case of the following letters. For example, if the password is Abcd, the procedure should change it to aBcD. Modify the procedure's code. Save the solution and then start and test the application. (If the user enters "May the Force be with you", the procedure should display m6TfBwY. If the user enters "may the Force be with you", the procedure should display M6tFbWy.)(F7.1, F7.2, F7.4, F7.6, F7.7, F7.10, A7.2) I need help with thPrivate Sub btnCreate_Click(sender As Object, e As EventArgs) Handles btnCreate.Click
' Create a password.
Dim strWords As String
Dim strPassword As String
Dim intSpaceIndex As Integer
strWords = txtWords.Text.Trim
If strWords <> String.Empty Then
' Assign the first character as the password.
strPassword = strWords(0)
' Search for the first space in the input.
intSpaceIndex = strWords.IndexOf("")
Do Until intSpaceIndex =-1
' Concatenate the character that follows
' the space to the password.
strPassword = strPassword & strWords(intSpaceIndex +1)
' Search for the next space.
intSpaceIndex = strWords.IndexOf("", intSpaceIndex +1)
Loop
' Insert the number after the first character.
strPassword = strPassword.Insert(1, strPassword.Length.ToString)
' Display the final password.
lblPassword.Text = strPassword
End If
End Subis part of the code.Thank you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 22nd International Conference Dexa 2011 Toulouse France August/September 2011 Proceedings Part 1 Lncs 6860

Authors: Abdelkader Hameurlain ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2011th Edition

3642230873, 978-3642230875

More Books

Students also viewed these Databases questions

Question

Understanding Group Leadership Culture and Group Leadership

Answered: 1 week ago