Many user-created passwords are simple and easy to guess. Using java language, write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "!" to the end of the input string. i becomes 1 a becomes @ m becomes M B becomes 8 s becomes $

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

Many user-created passwords are simple and easy to guess. Using java language, write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "!" to the end of the input string.

  • i becomes 1
  • a becomes @
  • m becomes M
  • B becomes 8
  • s becomes $
Expert Solution
Step 1 Overall view

The string will be taken by the user using Scanner class or BufferedReader Class.

The taken string will be traversed character by character and when an I is found, its replaced by 1 and so on. As the code is in java, Java provides a function replace() in string and it can be used for each character replacement

In java, the string are concatenated by + sign itself. So at the end, the string +'!' operation will append a ! at the end and output the required string.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
InputStream
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,