A Substitution Cipher !!! very important to follow all the directions, which means creating the specified classes with t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

A Substitution Cipher !!! very important to follow all the directions, which means creating the specified classes with t

Post by answerhappygod »

A Substitution Cipher !!!
very important to follow all the directions, which meanscreating the specified classes with the specified methods. Pleasedon't throw the code of the cipher, it's all over theinternet. Follow the directions! thank you.
To begin, create an interface called"TranslationMatrix". This interface has a single methodcalled Translate which takes in an array of Stringobjects. Each string object should be a single word. Using thisinterface you will need to make a class tohandle the cipher listed above. Once you have theclass set up using the interface, you will need to create aclass called Translator with the followingmethods: public Translator( TranslationMatrix m): Aconstructor that takes in an object of type TranslationMatrix.public String translateText(String text): This method willdo the actual translation. The text will need to be broken up intoindividual words. To help with this, you should take a look at thesplit() method in the String class. Once you have the text brokenup into single words in an ArrayList, you should send the arraylist to be translated by a class that acts as a TranslationMatrix.Finally, you should return the translated text as a string. Thelast class you create will be Cipher.java whichwill serve as your main. This class should ask the user to enterthe text to be translated. The main will then call thetranslateText method of the Translator class and then outputwhatever this method returns. The program will then ask for anotherpiece of text to translate and repeat the process of translatingthe text with the same cipher.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply