Capella University Caesar Cipher Translation Scheme in Java Programming Exercise – Assignment Help

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper

I’m studying for my Computer Science class and need an explanation.

Implementation Notes

To implement a Caesar Cipher translation scheme in Java, you will need to acquire the Key to be used and the text string to be translated. You’ll need to access the characters in the String one-by-one. Use the String.charAt() method to do this. You’ll need to translate each letter using the Key, leaving nonletters alone. You can use the Character.isLetter() method to determine whether a given character is a letter. You’ll need to use exception handling to deal with the case of a nonnumeric Key.

The Key and the String should be on one line, as illustrated. Implement the heart of the program as a method, called “translate.” It should have the following declaration: public static String translate(String inText, int key)

Following is an example of a portion of what your program’s output might look like:

Input key <space> text: 0 AbCd

Translated: AbCd

Input key <space> text: 1 Testing, 1-2-3.

Translated: Uftujoh, 1-2-3.

Input key <space> text: -1 Uftujoh, 1-2-3.

Translated: Testing, 1-2-3.

Input key <space> text: X

Bad key. Not in -3..+3

Input key <space> text: 99

In this assignment, you will build a program that implements the Caesar Cipher algorithm. You must build a method called translate—public static String translate(String inText, int key)—that accepts the provided text and Key. It then uses the Caesar Cipher algorithm to translate inText into a String, called outText, which is what the method returns. If Key is greater than zero, then every character in inText is “shifted” to the right in the alphabet by Key characters. For example, if Key = 1, then “ABC” becomes “BCD.” If key is less than zero, then every character in inText is “shifted” to the left by Key characters. For example, if Key = –2, then “DEF” becomes “BCD.” The key value is guaranteed to be in the range –3..+3.

Translate must be a method with the header/signature shown above.

You also need to build a “driver”—it’s the main method—which does the following:

  1. It displays an appropriate title message.
  2. It repeatedly requests input: <key value=””> <input text=””>, the Key value is a (possibly signed) integer, followed by whitespace, followed by text through the end of the current line.
  3. It calls translate() to translate the text using the Key.
  4. It then displays the resulting text.
  5. It repeats steps 2–4 until a Key value > –3 or < –3 is encountered.
  6. Invalid Keys (nonnumeric) are dealt with using exception handling; the program then continues.

Note: Translate both encodes(key > 0) and decodes (key < 0)

  • Assignment Instructions

Complete the following steps to build a program that implements the Caesar Cipher algorithm.

  1. Build a translate method—public static String translate(String inText, int key)—that accepts the provided text and Key.
    • Translate must be a method with the header/signature shown above.
  2. Build a driver method.
  3. Take sufficient screen shots to demonstrate that your program meets all requirements.
    • Include the execution output of your program to convince a reader that it functions properly—both encoding and decoding messages.
    • Test your program with both positive and negative Key values and text strings containing both alphabetic and nonalphabetic characters.
    • Paste these screen shots into an MS Word document.
  4. For your final test, you use must use the following input: “–3 Zh, wkh 42 shrsoh, ri wkh . . .”
  5. Create a .zip file containing your NetBeans Caesar Cipher project.
    • Before zipping your project, right-click the project and “clean” it. This greatly reduces the file size and speeds up the program’s performance.
    • Then close NetBeans.
  6. Add the MS Word document with your screenshots to your .zip file.
  7. Submit your cleaned Caesar Cipher project in an appropriately constructed and correctly named .zip file.
    • Name your .zip file following this pattern: LastName_Week1.zip. ( Austin_Week1.zip) My name

Deliverable

Submit a single .zip file with your Caesar Cipher project files and MS Word screenshot document by 11:59 p.m. on Sunday of this week.


Assignment Pro (28431)
New York University
Is this question part of your assignment?

Sign up to get the full answer

Get Answer
   

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)
Have an assignment question? Get help from Expert tutors!
Your time is important. Let us write you an essay from scratch
100% plagiarism free
Sources and citations are provided
Stuck? We have tutors online 24/7 who can help
you get an A grade paper.
Ask Expert Tutors
Answer in as fast as 15 minites

Are you looking for Assignment Help save 20% with this code BIXBY