Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java, Professor Potter has left a secret message, of unknown length, encoded in file msg.dat (posted on Canvas) for you to unravel. The setup

In Java, Professor Potter has left a secret message, of unknown length, encoded in file msg.dat (posted on Canvas) for you to unravel. The setup is simple: each line of the file contains one char and one nonnegative integer. The key to reading the message is organizing the characters in the proper order. The integer indicates the position of the character within the message. For example:

e 2

b 1

a 3

h 5

c 4

spells 'beach' when unraveled.

You will create and submit 2 classes:

MessageDecoder class:

  • Responsible for converting a scrambled message file into plain text.
  • Contains a public method getPlainTextMessage() that returns the String object.
  • The scrambled file must be scanned only once and must be scanned inside this class.
  • Must utilize the linked list data structure to accomplish the decoding work. (See Lab 4 & Lab 5) - referencing a link sorting function and remove duplicates function
  • Does not call any methods of SecretMessage class

SecretMessage class:

  • Contains the main() method
  • All of printing to console must be done in this class
  • All of user input from the keyboard must be performed in this class
  • Uses the public methods of your MessageDecoder class to accomplish the decoding.

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

More Books

Students also viewed these Databases questions

Question

a. How are members selected to join the team?

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago