QuestionQuestion

Deliverables: One digital file containing your code in plain text or java format.
Additional considerations: Make sure your code is commented, properly indented, and submitted on time.
Instructions
You have been tasked with creating a system that “encrypts” and “decrypts” user passwords. The program should allow a user to first set their desired password. The system will then concatenate the string “P4$$w0rd_1$_N0w_$4f3” at the beginning and at the end of the password.
Once set, the system should request the user to input the password to authenticate him or her and print a welcome message if the password was correct, or an error if it wasn’t.
The system should then allow the user to try a total of three times after “locking”, at which point the program should terminate.
If the user succeeds, using for loops your program should ask for a number and print the Fibonacci sequence of the chosen number.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.Scanner;


public class Assignment {

    public static void main(String[] args) {
       /**
         * The program should allow a user to first set their desired password.
         */
       Scanner keyboard = new Scanner(System.in);
       String input;

       System.out.print("Set your desired password: ");
       input = keyboard.next();

       String encryptedPassword = encrypts(input);
       /**
         * Once set, the system should request the user to input the password to
         * authenticate him or her and print a welcome message if the password
         * was correct, or an error if it wasn’t.
         *
         * The system should then allow the user to try a total of three times
         * after “locking”, at which point the program should terminate.
         */

       int i = 0;
       while (i < 3) {
            System.out.print("Input the password: ");
            input = keyboard.next();

            /**
             * If the user succeeds, using for loops your program should ask for
             * a number and print the Fibonacci sequence of the chosen number
             */
            if (input.equals(decrypts(encryptedPassword))) {
                System.out.print("Enter a number: ");
                int num = keyboard.nextInt();
                // basic case
                if (num <= 0) {
                   System.out.print("0");
                } else if (num == 1) {
                   // another basic case
                   System.out.print("0 1");
                } else {
                   /// normal case
                   System.out.print("0 1");
                   int f0 =...

By purchasing this solution you'll be able to access the following files:
Solution.java.

$18.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Computer Science - Other Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats