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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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