Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CASE STUDY : OurSecurity Sdn. Bhd. has appointed you as their new system security developer. Your first task is to code a new Java program

CASE STUDY :

OurSecurity Sdn. Bhd. has appointed you as their new system security developer. Your first task is to code a new Java program that implements your teammates' new encryption procedures/steps.

The encryption steps are as follows:

Step 1 : The program will ask the user to enter a text via console. Convert all the characters to lower case.

Meet me at 10AM meet me at 10am

Step 2 : Swap all the vowels in the text using the following rules:

  1. Swap 'a' with 'u'
  2. Swap 'e' with 'a'
  3. Swap 'i' with 'e'
  4. Swap 'o' with 'i'
  5. Swap 'u' with 'o'

meet me at 10am maat ma ut 10um

Step 3 : Inverse the swapped text without inverting the words.

maat ma ut 10um 10um ma maat

Step 4 : Replace all alphabets and numbers in the inversed text with Morse Code alphabet using the following setting:

Note : in Morse Code, each alphabet is separated by one (1) white space and each word is separated by two (2) white spaces.

Step 5 : The program will display the final encrypted message.

.----*-----*..-*--**..-*-**--*.-**--*.-*.-*-

(Note : * represent empty space)

Table 1 : Class and methods

Class Name

Method In Class

Purpose of the Method

Input

getInput()

  1. Ask the user to enter a text
  2. Return the original text

Swap

getSwap()

  1. Receive the original text from the caller.
  2. Swap all the vowels based on the setting given in the case study
  3. Return the processed text

Inverse

getInverse()

  1. Receive the swapped text from the caller
  2. Inverse the swapped text using the rule given in the case study
  3. Return the inversed text

MorseCode

convertMorse Code()

  1. Receive the inversed text from the caller
  2. Convert all alphabet and numeric to Morse Code alphabets
  3. Return the final Morse Code text

Encrypt

main()

  1. The main class and method in the program
  2. Call methods of other classes following the steps given in the case study
  3. Display the final Morse Code text to console
  4. Ask the user if they wish to try again or not.
  5. If the user chooses to try again, restart from the first step. If not, the program will display Thank you and ends.

In one (1) Java file, write a program implementing all the five (5) classes and their methods mentioned in Question 1. The body of each method is based on the encryption steps given in the case study. The implementation must include suitable control and data structure. But you are not restricted to the one discussed in class. The program must also have proper documentation/comments explaining key point of your program. This will assist with the code readability and tracing.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions