Question: C++ Question 1 In cryptography, Caesar cipher is one of the simplest encryption techniques. The key idea of this method is to replace each plaintext
C++


Question 1 In cryptography, Caesar cipher is one of the simplest encryption techniques. The key idea of this method is to replace each plaintext letter with one fixed number of places down the alphabet. Below is an example with a shift of five: Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz Cipher: FGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDE To cipher a string, 'A' is replaced by ' F, ' B ' is substituted by ' G ', and so on. To decode a string, ' A ' is replaced by ' v ', etc. Write a program that takes a string: "M Go Blue Beat Ohio State" as an input in main. Main allocates a 2 dimensional array, long enough to hold the string above. It moves the message above into the first row. It then passes the array (by reference) and the length of the array to a function called "encode". Encode will encode the characters in the first row and place them in the second row and return. Main will print out the original content, then the encoded content directly under the original content. Take a screenshot. No Test plan is necessary. Question 2 This is an exercise to get practice creating classes and using inheritance. No test plan is necessary. Each class must have its own .cpp and .h files. All classes must have default constructors and a second constructor that sets all of its a When any Pet is constructed, it should output: "I'm , my color is and I'm happy to be your pet!" When the Dog class is asked to bark, it will output: ">, the says: Bow Wow! Bow Wow!" When the Bird is asked to fly, it will output: "Yahoo! > is flying > feet with my wingspan of feet!" When the destructor for a pet is called, it should output: "> is leaving now, sorry you didn't like my color of: . :-(" Each output should be on its own line. Write a program to use pointers, allocation, and new to perform the following. - Create a dog named Lassie with breed of Collie color of "Brown" - Create a dog name Ruby, with a breed of Mixed with a color of "silver" - Change Ruby's breed to Labrador - Change Ruby's color to Chocolate - Create a bird named Tweety, with .6 ft wingspan and color "Yellow" - Create a bird named "Donald Duck", with a 0 wingspan and color "white" - Change wingspan of Donald Duck to 1.5 feet. - Have Lassie bark - Have Ruby bark - Free Ruby and Lassie . - Have Tweety fly 250ft. - Have Donald Duck fly 18ft. - Free Donald Duck. - Cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
