Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Design a program that uses abstract classes. To be completed by a group of 3 people. Assignment: In cryptography, encryption is the process of

image text in transcribedimage text in transcribed

Objective: Design a program that uses abstract classes. To be completed by a group of 3 people. Assignment: In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it. In this lab you will write a program to decode a message that has been encrypted. This is a group assignment. Go back to the Introduction to the Class assignment to search for group members you think may work well with you. Then visit Working in Groups to learn how to join a group. Detailed specifications: Define three classes. Each one should be in a separate file. You can choose to define the class and its functions inline, all in a header file, or have a .h and.cpp file for each class. Abstract base class with the following: A variable to hold an encrypted message. This variable should be a string which is initialized in the constructor. o A status variable that will tell whether the message was loaded successfully. - A constructor that receives one parameter: a string variable with a file name and uploads its content to the string variable that is supposed to store it. A pure virtual function called decode. This function will be defined in derived classes. o A function that prints the message on the screen A derived class that implements a version of decode according to the following algorithm: o input character: abcdefghijklmnopqrstuvwxyz o decoded character: iztohndbeqrkglmacsvwfuypjx o That means each 'a' in the input text should be replaced with an 'i, each 'b' with a 'z' and so forth. A second derived class that implements a version of decode according algorithm known as "rotational cypher". In this encryption method, a key is added to each letter of the original text. For example: P P L E Cleartext: Key: Ciphertext: 4 4 4 4 4 E T T I In order to decode, you need to subtract 4. I will provide a program that tests your classes. How to split the workload: Each group member should be responsible for one class. You all must make sure they compile and run together. Testing/Output: A main program that can be used to test your classes can be found here. Please use the following files as input text files: EncryptedA.txt and EncryptedB.txt > The output should be printed on the screen. Attach the output of your program as a comment at the end of your source code. Turn in: Encrypted.h, CypherA.h and CypherB.h (corresponding.cpp files optional). Only one person in the group should turn in the assignment for the group. ALL files should have the group # and the names of ALL group members

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

What is the age of the oldest outstanding invoice?

Answered: 1 week ago