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]
4 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]4 years ago
4 0

woahhhhhhhhhhhhhhhhhh dude

You might be interested in
What types of files are saved with the mp3 and zip extensions
Tanya [424]

Mp3 files are audio files and zip extentions are compressed files so they take up less space

4 0
4 years ago
The desired outcome of any form of communication should always be
mezya [45]

Answer:

talk it through and look at each sides differences and take heat.

Explanation:

Most desired outcomes in any form of community should be (Im sorry for...)

or I don't understand what you mean or I missunderstood so please....

At times when people communicate things don't alwasy go as planned out so, first you must both be aware of the issue or situation and, not yell but one persons speak at a time while the other listens and then they talk

7 0
4 years ago
Read 2 more answers
A 200-g hockey puck is launched at an initial speed of 16 m/s up a metal ramp that is inclined at a 30° angle. The coefficients
rusak2 [61]

Answer:

h = 8.588 m

Explanation:

Given:

Mass of hockey puck:  m  =  200  g  =  0.2  K g

Angle of incline:  θ  =  30º   (with respect to horizontal)

Coefficient of static and kinetic friction between the puck and ramp:  

μ s  =  0.4   and    μk  =  0.3

initial speed:  

v  =  3.5  m /s

Let  h  be the vertical height reached by the puck, above the ground. This corresponds to a distance of  

d =  h *sin  30º =  2 *h

along the incline. As the puck is moving, only kinetic friction comes into play as it climbs up the incline. Let  N  be the normal reaction exerted by the metal ramp on the ball. Then,

N  =  m*g *cos  θ  =  0.2 *9.8 1*cos  30 º =  1.6991  N

Therefore, kinetic friction acting on the puck is:  

F k  =  μ k *N  =  0.3 *1.6974  =  0.50974 N

From work energy theorem, the change in kinetic energy should equal the work done by friction and gravity. Therefore,

0.5*  0.2 *16²  =  0.50974 *2h + 0.2*9.81*h

⇒  h = 8.588 m

8 0
3 years ago
Write function modifyString(origString, charsToReplace, count) that takes as input a string origString, a string charsToReplace,
laila [671]

Answer:

The code of the above program is provided below. using Python

Explanation:

<u>Code in Python 3:- </u>

def modifyString(origString,charsToReplace,count):

# Make s1 as original string

s1=origString

# Make s2 as charsToReplace string in lowercase

s2=charsToReplace.lower()

# Make s3 as charsToReplace string in uppercase

s3=s2.upper()

# Initialize answer as an empty string

ans=''

# Iterate the string upto length times

for i in range(len(s1)):

# check for chars in the string and append to the answer

if (s1[i] in s2) or (s1[i] in s3):

ans=ans+count*s1[i]

else:

ans=ans+s1[i]

# return the final string

return ans

print(modifyString("Our cat is funny","aeiou",5))    

print(modifyString("Our cat is funny","zu",3))

8 0
3 years ago
A network administrator is configuring an ACL with the command access-list 10 permit 172.16.32.0 0.0.15.255. Which IPv4 address
lord [1]

Answer:

For this wild card mask 0.0.15.255 the ACE IP address will be 172.16.47.254

Explanation:

ACL is the access control list that is used to enlist the ip addresses that allowed or restricted to access the network. ACE is an IP address from the list ACL that has all rules and regulations related to access of network. The ACE could be in the range of IP address in ACL. ACL can be calculated with the help of initial IP address adding with wild card mask.

So

Initial IP address is = 172.16.32.0

Wild card mask =0.0.15.255

by adding above values we can find the last IP address of ACL.

after addition

Final IP address is = 172.16.47.255

The options that are available with question, Only option between the range is  172.16.47.254. So we can say that This is the only ACE IP address in options.

7 0
3 years ago
Other questions:
  • Options to open, save, and print a document are found on which of the following tabs?
    9·2 answers
  • In the view that follows, which field can't be updated create view example_2 as select invoice_number, invoice_date, invoice_tot
    13·1 answer
  • The ________ is the part of the nail plate that extends beyond the nail bed.
    8·2 answers
  • Write a C++ program that consist
    5·1 answer
  • This isn't school related but if I get a 2 month free plan and it is expired and I don't have a card attached to my account will
    14·1 answer
  • Tyler is feeling overwhelmed by the programming assignment from his supervisor and wants to break the task down into smaller, mo
    5·2 answers
  • What is the quickest way to change the format of a table?
    8·2 answers
  • Select the correct answer.
    13·1 answer
  • PART 2 - Exercise 2 - Programming Assignment
    15·1 answer
  • Which things computer case contains
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!