Collect a message from the user and writes it out again

Assignment Help Computer Engineering
Reference no: EM132210430

Question :

Write a program in the language of your choice to implement th Caesar Cipher program.

A. Write a main function (Method,Procedure) that collects a message from the user and writes it out again. Assume the simplicity that the message contains no more than 10 characters and that only the 26 uppercase letters of the alphabet are used. Use an array of 10 elements to store the message.

Ask the user to enter no more than 10 characters, one per line, and to terminate the message by enterning some special character such as %.

Use a variable to keep track of the number of array elements actually used ( which could be fewer than 10 if the message is short) so that you do not write out meanigless characters stored at the end of the array.

B. Write a function (method, procedure) to modify the array to represent the encoded form of the message using the Caesar cipher. Have the main function ask for the shift amount.

Pass this information, along with the message array and the number of array elements actually used, to the encoding function. To get from one character to the character s units along in the alphabet, you can simply add s to the orginal character.

This works for everything except the end of the alphabet: here you will have to be a bit more clever to cycle back to the beginning of the alphabet once the shift is applied. Have the main function invoke the encoding function and then invoke WriteMessage to write out the encoded form of the message.

Reference no: EM132210430

Questions Cloud

Which aspects of the roman built environment were borrowed : What is the relationship between ancient Roman architecture and ancient Greek architecture? Using at least three buildings explain which aspects.
Write a program in the language of your choice : Write a program in the language of your choice (prefer C or Java) that will simulate process scheduling
Write a program that opens a plotting grid window : Write a program that opens a plotting grid window (labeled Lake Matlab) with its axis set to [-11 11 11 11 and the plots a circle of radius.
What step can leadership team take to ensure full compliance : You all work in or know of people who work in enterprise IT environments Maintaining the enterprise security posture, legal risk, and security is constantly.
Collect a message from the user and writes it out again : Write a main function (Method,Procedure) that collects a message from the user and writes it out again.
Describe the printmaking method used : Both Albrecht Durer and Rembrandt made numerous prints. See if you can find 3 different PRINT made by one of these artists on the web and upload the jpg image.
Write a program to model a simple calculator : Write a program to model a simple calculator. Each data line should consist of the next operation to be preformed from the list below and the right operand.
Is the monument representational or nonrepresentational : Imagine that there is a competition to design a public monument in New Orleans. It must commemorate a historical local event, such as, an aspect of Hurricane.
Write a program to operate a light : Write a program to operate a light according to the following sequence: A momentary pushbutton is pressed to start the sequence.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is project scope

What is project scope? Why is it important to define project scope clearly?

  Compute the statistics requested

The data must be stored in an array. Compute the statistics requested above. Use a function for each task as well as a function to read.

  Invent a scheme by which the goal can be accomplished

In all the examples in this chapter, a server can only listen to a single address. Invent a scheme by which this goal can be accomplished.

  Write a program to shear an object

Write a program to shear an object with respect to any of the three coordinate axes, using input values: or the shearing parameters.

  Questiongiven two character strings s1 and s2 using c and

questiongiven two character strings s1 and s2. using c and pthread to write down a parallel program to find out number

  Design and implement a class for a deck of cards

Design and implement a class for a deck of cards, named DeckOfCards.

  Computes the wait time in seconds

Computes the wait time in seconds. Calculate the mean and the standard deviation. Locate the shortest wait time and the longest wait time for any number.

  It workers are in a unique position because they have skill

IT workers have many different relationships, including those with employers, clients, suppliers, other professionals

  Write a script that monitors the creation of pdf files

Write a script that monitors the creation of .pdf or .PDF files in the current directory. Every minute it should display a list of those filenames created.

  What would be the interest rate

Suppose that you are planning to pay $14500 yearly for 4 years for a car which is $50000 now what would be the interest rate?

  Create an undo tablespace with a single data file

Simulate a problem with undo. You will need to be connected as user SYSTEM or some other user to whom you have granted the DBA role.

  Why dynamic typing makes this feature more powerful

In Ruby, as in Java 8 or Scala, an interface (mix-in) can provide method code as well as signatures.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd