Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I can\'t get my program to come out right and know I am missing a lot of differe

ID: 3627827 • Letter: I

Question

I can't get my program to come out right and know I am missing a lot of different information and need help with it. This is my first programming class and the code has to be in C sharp programming language. I have the assignment below on what they are asking for, thanks for your help!

Step1: Part A
Part A: Password Program
Step 1: Requirements
Write a Windows application that simulates entering a password. The user enters a password and clicks Next. Then, the user types the password again and clicks Continue. The program will display a Message Box that displays either the passwords are equal or that they are not equal.

Sample Output: There is pictures for each of the next four questions but it wouldn't let me add them.





I type in Bob in the password field and click Next.



I type in Bob in the second password field and click Continue.



Message displayed if the passwords match.



Message displayed if the passwords are different.



Step 2: Processing Logic
Using the pseudocode below, write the code that will meet the requirements:

Next Button Event Handler Method
If the first password textbox is not blank
Make visible the second password textbox, the Done button, and the labels
Else
Put "You must enter a password" in the label
End-If

Done Button Event Handler Method
If the first password text box is not empty
If the first password text box equals the second password textbox
Display the message "Passwords are the same"
Else
Display the message "Passwords are different"
End-If
Else
Display the message "You must enter a password"
End-If
Step 3: Create a new project
Create a new project and name it LAB6A.
Write your code using the Processing Logic in Part A Step 2. Make sure you save your program.
Step 4: Compile and Execute
a) Compile your program. Eliminate all syntax errors.

b) Build your program and verify the results of the program. Make corrections to the program logic if necessary until the results of the program execution are what you expect.


Here is what sample code I have so far but need help in order for it to come out right, any help will be appreciated.



#include <stdio.h> //for puts()
#include <conio.h> //for getch(), getche()..etc...
#include <iostream.h>//for (cout,cin)
#include <string.h>//for strcmp()
void p1()


{
clrscr();//display screen... of course...
cout<<" ENter the password ";
}
char* pass()


{
char* password, *sub;//the password string and sub -> well i'll tell u later
char ch;//the character that yer gonna enter
int n=0,m;
/*
n->keeps track of stars that are displayed
m->well... i'll tell u later...
*/
sub=password;
/*now in this statement we store the password's 0th location in sub
you will understand why i am doing this later...*/
p1();
int i=0; // i-> keep track of password
ch=getch();
do


{
if (ch!='')


{
cout<<"*";
}
else if (ch=='')


{
p1();
if (password!=sub)


{
password--;
i--;
m=n; //m is simple variable that's used. i dont want to touch my n...
n--;
for (; m>1; m--)
cout<<"*"; // displays the new no. of stars
}
}
ch=getch();//same proceedure follows unless enter is encountered.
}while(ch!=' ');
*password=''; //last part of password is entered as null
for (; i>0; i--)
password--;//BRINGING THE POINTER TO FIRST LOCATION
return password;//RETURN POINTER
}
void main()


{
char* pa;
pa=pass();//RECIEVING THE PASSWORD
int m, n,i;
m=n=0;
i=strlen(pa);
cout<<" The password that you enterred just now is ";
puts(pa);
cout<<" It's of length "<<i;
getche();
}

Explanation / Answer

#include #include main() { char a[100], b[100]; printf("Enter your password "); gets(a); printf("Enter your password again "); gets(b); if( strcmp(a,b) == 0 ) printf("passwords match. "); else printf("passwords are different. "); return 0; }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote