Answer to Question #258333 in C# for Reeke

Question #258333

All the requirements from Task 1 must still be met by the program, with the following changes and additions:

1. The software shall persist the data in a SQL database.

2. The user shall be able to register with a username and password.

3. The software shall store only the hash of the password in the database.

4. The user shall be able to log into the software with their username and password.

5. The user shall only be able to see their own data and never that of other users.

Non-functional requirements:

1. The application should make use of the custom class library developed in Task 1. You may update the class library as necessary for the new functionality.

2. You can choose whether to access the database using the ADO.NET connected layer, ADO.NET disconnected layer or Entity Framework.

3. Regardless of database access technology, the application should use multi-threading to ensure that the user interface never becomes unresponsive while retrieving or storing information.



1
Expert's answer
2021-10-31T12:02:11-0400


using System;
class HelloWorld {
  static void Main() {
      string name;
      string address;
      string dateOfBirth;
      string username;
      string password;
      
      
      Console.Write("Enter name: ");
      name=Console.ReadLine();
      Console.Write("Enter address: ");
      address=Console.ReadLine();
      Console.Write("Enter date Of Birth: ");
      dateOfBirth=Console.ReadLine();
      
      Console.WriteLine("Create login username and password\n")
      Console.Write("Enter username: ");
      username=Console.ReadLine();
      Console.Write("Enter password: ");
      password=Console.ReadLine();
      
      Console.WriteLine("Log in to the system: ");
      
      Console.Write("Enter your username: ");
      user_n=Console.ReadLine();
      Console.Write("Enter your password: ");
      pass=Console.ReadLine();
      
      if(user_n==username & pass==password){
          Console.WriteLine("Logging sucessful. Your details are as follows: ");
          Console.WriteLine("Name: "+name);
          Console.WriteLine("address: "+address);
          Console.WriteLine("dateOfBirth: "+dateOfBirth);
          Console.WriteLine("username: "+username);
      }
      else{
          Console.WriteLine("Invalid login details");
      }
      
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS