Boost your Grades with us today!

CIS 22B De Anza College Pure Virtual Function Encrypted Message Lab Report


Design a program that uses abstract classes. To be completed by same group as last lab.


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.

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.
    • 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.
    • A function that prints the message on the screen
  • A derived class that implements a version of decode according to the following algorithm:
    • input character: abcdefghijklmnopqrstuvwxyz
    • decoded character: iztohndbeqrkglmacsvwfuypjx
    • 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 accordingalgorithm known as “rotational cypher”. In this encryption method, a key is added to each letter of the original text. For example:
    Cleartext:        A    P    P    L    E
    Key:              4    4    4    4    4
    Ciphertext:       E    T    T    P    I

    In order to decode, you need to subtract 4.

I will provide a program that tests your classes.

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 has to turn in the assignment for the group. A screenshot of your tests.

ALL files should have the group # and the names of group members.


15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.