1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
3 years ago
13

Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning value

s from a method, loops, user input, and user display.
For this assignment, you will be creating your own secret code program. Using two arrays, you will initialize one with the lower case alphabet, the other array will consist of a set of alternate symbols or letters, that will form a replacement cipher. The program will start with displaying a description of the program and instructions for the user. Then the user will enter a sentence. The program will then replace each letter with the alternate symbol or letter with the corresponding subscript in the second array (you may treat spaces as a "space" or choose to code the space). The program should then allow the user to enter a "secret code" and translate it back to the original English sentence. The program will use a method that receives the array name and returns the value of the subscript. This value is then used to retrieve the alternative symbol or letter. This method is used for both coding and decoding. The example at the end of these instructions provides a sample display of a cipher program. For this example simple numbers corresponding to their position in the alphabet will be used as the cipher. Your secret code may not use the simple number code in the example, it should use a unique approach that cannot be easily translated without the program.
You will submit your program files and execution screenshots demonstrating all the functionality of the program with at least two examples each of coding and decoding. Remember that your code must be executable. Remember to review the rubric to ensure you have met all the program grading requirements to maximize your grade.
SAMPLE OUTPUT:
This program will translate your input into a secret code. It can also translate your secret code back into English for the receiver. When prompted, enter your input and the program will provide the code or accompanying translation.
Do you want to code or decode? Enter 1 for code or 2 for decode
1
Enter your sentence all in lowercase with no punctuation:
when will the semester start
Your message is:
22 7 4 13 22 8 11 11 19 7 4 18 4 12 4 18 19 4 17 18 19 0 17 19
Do you want to code or decode? Enter 1 for code or 2 for decode
2
Enter your sentence all in secret code with no punctuation:
7 4 11 11 14
Your message is:
hello
Computers and Technology
1 answer:
Contact [7]3 years ago
4 0

woahhhhhhhhhhhhhhhhhh dude

You might be interested in
Determine the number of bytes necessary to store an uncompressed RGB color image of size 640 × 480 pixels using 8, 10, 12 and 14
dexar [7]

Answer:

For 8 bits / Color Channel: 921, 600 bytes.

For 10 bits / Color Channel: 1,152,000 bytes.

For 12 bits / Color Channel: 1,382,400 bytes.

For 14 bits / Color Channel : 1,612, 800 bytes.

Explanation:

Un uncompressed RGB color image of 640 pixels wide by 480 pixels height (VGA resolution) uses 3 samples of x bits fin order to represent the quantity of each primary color (red, green and blue) in a given pixel of the image.

So, if we use 8 bits/ sample, we can calculate the bytes needed to store a complete image as follows:

640*480*3*8 bits = 7, 372,800 bits. (1)

As, by definition, 1 byte= 8 bits, we have:

Nº of bytes = 7,372,800 / 8 = 921,600 bytes. (2)

In order to get the bytes needed to store the same image, using 10, 12 and 14 bits/ sample, all we need is replacing 8 by 10, 12 and 14 in (1), and then dividing by 8 as in (2).

Proceeding in this way we obtain:

640*480*3*10 = 9,216,000 bits ⇒    1,152,000 bytes.

640*480*3*12 = 11,059,200 bits ⇒   1,382,400 bytes.

640*480*3*14=   12,902,400 bits ⇒  1,612,800 bytes.

8 0
3 years ago
What does Adsl stand for?
spin [16.1K]
ADSL stands for Asymmetric Digital Subscriber Line


7 0
3 years ago
Read 2 more answers
RFID can be used for all of the following applications except:_________.
serious [3.7K]

Answer:

B. Access point repeater

Explanation:

RFID can be used for all of the listed applications except for Access point repeater. This is because Radio Frequency Identification is a technology, which includes wireless data capture and transaction processing for both short and long-range applications. Usually tracking, tracing, accessing, and managing information. It can unfortunately not be used for repeating the same RFID signal or any access point for that matter.

3 0
3 years ago
modify hw 02 c.c to use envp instead of environ. be sure that you understand how the code works. provide liberal comments to exp
rjkz [21]

With the aid of pointer-based arithmetic operations and the usage of pointers in comparison operations, address arithmetic is a technique for determining the address of an object. Pointer arithmetic is another name for address arithmetic.

The pointers can be used for mathematical operations like addition, subtraction, etc. The outcome of an arithmetic operation on the pointer, however, will likewise be a pointer if the other operand is of type integer because we know that the pointer includes the address. These operations are addition and subtraction. In C++, a pointer's value can be increased or decreased. It signifies that we can change the pointer's value by adding or removing integer values. A pointer arithmetic can be subtracted (or added) from another in a manner similar to this.

Learn more about arithmetic here-

brainly.com/question/11424589

#SPJ4

4 0
1 year ago
Write a program that asks the user to enter a number of seconds and then printsthe same amount of time in days, hours, minutes,
MariettaO [177]

Answer:3363 seconds

Explanation:3363 is equivalent to 0days 1 hour, 1 min, and 7 sec

8 0
3 years ago
Other questions:
  • What is the main role of LDAP?
    14·1 answer
  • Which of the following events would most likely produce an earthquake
    7·1 answer
  • One of the first signals that an organization is making progress in the development of its IR program, specifically in the devel
    6·1 answer
  • A _____ are devices that permit a user to connect to a digital t-carrier service.
    6·1 answer
  • What is the FaFASA4caster used for
    10·1 answer
  • Write a function check_palindrome that takes a string as an input and within that function determines whether the input string i
    12·1 answer
  • Example of language processor software
    8·1 answer
  • What is data science?​
    15·1 answer
  • Why do my airpods keep disconnecting from my laptop
    8·2 answers
  • Write an expression in Boolean algebra that evaluates to 1 when an odd number of bits of the number is 1 and 0 otherwise
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!