Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
These are the instructions:

Create a C# login program using while and do while loop to perform following tasks:

• Create a login profile for the users... for example Program will prompt the user to enter user ID

and password ( password need to be entered twice to check it match).
•Once login is created user will be prompted to login with his/her information.
• If user ID or password entered is incorrect your program will display “invalid user ID password”.
• Please give three to five tries maximum to the user, after this your program exit or display “your
account is disabled please contact customer service”

What I have tried:

I am struggling on it and I really need help
Posted
Updated 18-Nov-21 20:06pm
Comments
phil.o 19-Nov-21 4:13am    
What does your course material say about it?

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 
I think you should share the specific area where you're struggling in your code.

Or do you having difficulties in starting your application? If so, you need to create a Signup class and create a separate project, lets say it Service project, which will have the methods for login and signup where the business logic of these methods will be coded. Signup method will take Signup object as an input and then it should call your Data Access Layer(A separate project for database communication, lets say it DAL) which is directly communicating with db. For db communication you may either use ADO.NET or ENTITY Framework.
Same for login method, it will take UserId and Password as parameters and then it willl call your DAL.

And you can create a main method in which you can loop and Signup/Login as many user as you can.

Note: You need to create a console based application.

I hope it solves out your problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900