ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

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

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 11 May 2017 My Price 9.00

write a C++ application that encryptsits data

  • Question 1: User integer input & selectionA company that transmits data over the telephone is concerned that its phonemight be tapped. All data is transmitted as four-digit int values. You havebeen hired by JuniorProgrammers-R-Us to write a C++ application that encryptsits data so that the data may be transmitted more securely. Encryption is theprocess of transforming data into a form that can be recognized only by theintended receiver. Your application should read a single four-digit integer inputby the user and encrypt the information as described in the following steps.Your application should:a) Display a welcome messageb) Prompt the user for a four-digit number to encrypt and read it into an int variable.c) If the number entered is less than 4 digits (9999) then send theuser an error message indicating what the problem is and end the program, if not move on to stepd)d) Extract each digit and save them into 4 int variables. (Hint: integer division and the modulusmight be useful here).e) Encrypts each digit by replacing it with the (sum of that digit plus 7) modulo 10. Swap the 1st digitwith the 3rd and the 2nd digit with the 4th.f) Display the encrypted version of the number with a descriptive message.g) Display a closing message and end the program.Following are a few sample output screens to illustrate the expected behavior of your application.Here is a sample output screen. User input is marked byhttp://www.cloudpro.co.uk/cloud-essentials/cloudsecurity/3931/edward-snowden-and-the-rise-ofcloud-encryption/page/0/1Comp 218/Fall 2016 Page 2 of 4 Assignment #2Figure 1 – Valid inputFigure 2 – input more than 4-digitsFigure 3 – Input less than 4-digitsQuestion 2: User string input, selection and while loopJuniorProgrammers-R-Us is so happy with your code for question1, thatthey now have asked you to write another C++ application to generatepasswords. The program should prompt the user for a 5 letter string. Itthen reverses the order of the string and subtracts 15 from eachcharacter’s ASCII code to generate the password. If the user enters astring that does not contain exactly five characters, the application shoulddisplay an error message and exit.Your application should:a) Display a welcome messageb) Prompt the user for a 5-letter string and read it into a single string variable.c) If the string is not exactly 5 characters long send an error message and terminate the program, ifhttp://donwebblog.com/2012/10/las-peorescontrasenas-del-ano/Comp 218/Fall 2016 Page 3 of 4 Assignment #2not continue on to step d).d) Using a while loop, generate the password in a new string variable by reversing the order ofthe character in the string and subtracting 15 from each character to produce the password.e) Display the password with a descriptive message.f) Display a closing message and end the program.Here is a sample output screen. User input is marked byFigure 4 – Valid input (lowercase letters and digits)Figure 5 – Valid input (mix of lowercase and upper case letters)Figure 6 – Valid input (mix of lowercase and upper case letters as well as characters)Figure 7 – Input less than 5-charactersComp 218/Fall 2016 Page 4 of 4 Assignment #2Question #3: Selection Statements & Looping (do/while)In the second version of question 2, you are required to modify your program from Question 2 byreplacing the while loop with a do/while loop. The behavior of this version should be the same asquestion 2.

http://www.econcordia.com/my/course_documents/fundamentals_oop/Assignment%202%20Instructions.pdf

 

Answers

(11)
Status NEW Posted 11 May 2017 02:05 AM My Price 9.00

-----------

Attachments

file 1494470525-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)