Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 4 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 27 Aug 2017 My Price 11.00

method of substituting

Question 1

Polybius was an ancient Greek writer who first proposed a method of substituting different two-digit numbers for each letter. The alphabet is written inside a 5-by-5 square matrix which has numbered rows and columns:

 

 

1

2

3

4

5

1

A

B

C

D

E

2

F

G

H

I

J

3

K

L

M

N

O

4

P

Q

R

S

T

5

U

V

W

X

Y/Z

 

Note that Y and Z are written in the last cell to divide the letters evenly. The context of the message should make clear which of the two letters is intended.

 

To encode, substitute for each letter the numbers marking the row and column in which the letter appears. Always put the row number first. For example, the number J is 25. The number for J is 25.

 

The word WATERMELON would be encode as:

 

53114515433315323534

 

To decode, simply locate each letter indicate by the number. The number, 53, tells you to find the letter at the intersection of the fifth row and the third column.

 

Write two function encode and decode. Encode accepts a string of upper case letters and returns a string of digits. Decode accepts a string of digits and returns a string of upper case letters.

 

Write a function alphaSqueeze that accepts an arbitrary string and returns a string of upper case letters. alphaSqueeze, Write a function digitSqueeze that accepts an arbitrary string and returns a string of digits.

 

e.g. alphaSqueeze("Ralph124c41") returns "RALPHC" and digitSqueeze("Ralph124c41") returns "12441"

 

Write a program to thoroughly test the functions.

Question 2

Write a class, Polybius, that encrypts and decripts strings using the Polybius checker board. The class members are decode, encode, alphaSqueeze, digitSqueeze, and the 5 x 5 square matrix described in Polybius Checkerboard 1. The decode and encode are the only public members. alphaSqueeze, digitSqueeze and the matrix are private..

Answers

(5)
Status NEW Posted 27 Aug 2017 02:08 PM My Price 11.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)