Question: Write c++ classes. Define in header files and implement in cpp files. Test File main.cpp #include #include #include Vigenere.h /* The following main tests the

Write c++ classes. Define in header files and implement in cpp files.

Write c++ classes. Define in header files and implement in cpp files.Test File main.cpp #include #include #include "Vigenere.h" /* The following main teststhe functionality of various ciphers. Use at your own discretion, and feelfree to extend and/or modify in any way. This file will beoverwritten by the automarker if submitted. */ void testCipher(Cipher& cipher, const string&

Test File

main.cpp

#include #include

#include "Vigenere.h"

/* The following main tests the functionality of various ciphers.

Use at your own discretion, and feel free to extend and/or modify in any way.

This file will be overwritten by the automarker if submitted. */

void testCipher(Cipher& cipher, const string& text) { try { string encoded = cipher.encode(text); cout

int main() { string shortText="Top Secret";

string longText="According to Larry Wall, the original author of the Perl programming language, there are three great virtues of a programmer; Laziness, Impatience, and Hubris. Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it. Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to. Hubris: The quality that makes you write (and maintain) programs that other people won't want to say bad things about."; Vigenere vig("BANANA"); testCipher(vig, shortText); testCipher(vig, longText); try { vig.setCodeword("?"); } catch(Exception e) { cout

testCipher(vig, shortText); testCipher(vig, longText); try { vig.setCodeword("this-is-not-a-code-you're-looking-for"); } catch(Exception e) { cout

testCipher(vig, shortText); testCipher(vig, longText);

}

output

v1?A"'&446Top Secret

c%21A&,06AC1Bm04A;Bx0.;MB67'N15+6+=#/A07C*24N15A7*4A~'5.N2A1*40/)A#0/44iAn#I+='65ZAw/3#C+40&'ZA00'Av714,5\Az#=+='B5\A#*4A470.867N)2AC1N)5'06N')(>4CA71N44&8%4A>8(40.;A(0446;B'G240'+C7A'PAw6N/$-45N;27N9A+7'N.0$24[508,06A?42)A#2;'B98.;A)+=&N76'57;A$03A31&77N&20U6N*$84AC1B#=5F'5AB1N/$0HA@7(5C+>06A0$>77A86\Ak/?#C+(02'hAv*4A00*'AAH18A5'4.B97'=A7*4A2102D644B+BA1',06A;#=;\A#*,5N/0-(5N;>7B9A+C'B2A164$/BAC*$6N&>0I6N,D57AA'0%7AC1N;27AA='(&BMN$86N#268#;.HA$0C+2+3#C'N6+'ONi8$A+B[Bu7'N38#;+C;B67#CA0#:'BAA6#HA1#'AC*80*5N#1186\ According to Larry Wall, the original author of the Perl programming language, there are three great virtues of a programmer; Laziness, Impatience, and Hubris. Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it. Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to. Hubris: The quality that makes you write (and maintain) programs that other people won't want to say bad things about.

The codeword provided is not going to generate a safe encryption

The codeword provided is not going to generate a safe encryption

AU^oBRI`Uc Top Secret

.IQ_aQO\WnaUmUaYe^b^TXO]\VTUo[NTUePTKyocUK`UnNXSocUXSUnTXSQcl\WbcbKao^SeOo__UUbPZSSb*l2OjX[Kaczl/[`PaOS^RRqmQ]Qe6eQ_Oa}n9GhY]RYa*nANSo`bGZYcfebXPae[QZRYmi^beU_naUmWaRGboTSL]bclZ]oaRJcSTlUdUaNRZoT[K`WhlKf`T[JWdd_K{o8ae[QZRYmi^beebXaKm\POU`|bN\W^VlV`_V_G[cnaNOdn\ZVUalVS__YKmgXYRmVX[JmebRLc NTRoS\Ic]T[ZmgWNZmi^beeb^aKmc^l_]enQU\vclNOfTlZ]oP[YeUalY]o\NTgo`bKadX\TaoPOUcdnVZ{o8ZVOdXRTQU)l:VUnNTUUal_]enSKS dNS^naNSoR\S^ecRXmYblHSY]TeZQifsmDWVYm]PXKaoh\[mgaVZSo__UUbPZYmdWNZmT^[lboYbYboaRGQdnaUmi^bXm^TRJa{nO[boPPZcQ[Y_mQ]aOQY_NZSocUK[}n

IXZs`OW Td Top Secret

6LMc N]{Voi|aYEbW_-QQbs~e"UUo[\XOvUQ_tJ_huYf-^Vt"Jrc@JXyy`hvZXnZ]YZQnTnUWhVPO -^ aUtnTrcdMXr_o]yXG"lfY^^dM!f_YtJid Y[ P]brTHc Substitution cipher hierarchy, and the Vigenre cipher There are two major types of classic text ciphers: substitution ciphers and transposition ci phers. In substitution ciphers, each letter of plaintext is encoded and decoded individually. For this task, you will create a hierarchy of classes representing a generic cipher interface, and implement one concrete substitution cipher: Vigenre. Cipher The Cipher class is an abstract class that describes the basic interface of any cipher. This is an interface class, i.e. it provides no implementation. Create the Cipher class in a file called Cipher.h according to the UML specification below: Cipher tencodeconst strings string edecodelcanst strings): string A cipher is an algorithm that can encode plaintext, turning it into ciphertext, as well as decode string encode[const string&) This function is abstract and must be overridden by the derived classes. The function will receive plaintext (string) as input, encrypt it, and return encrypted ciphertext (string). Substitution cipher hierarchy, and the Vigenre cipher There are two major types of classic text ciphers: substitution ciphers and transposition ci phers. In substitution ciphers, each letter of plaintext is encoded and decoded individually. For this task, you will create a hierarchy of classes representing a generic cipher interface, and implement one concrete substitution cipher: Vigenre. Cipher The Cipher class is an abstract class that describes the basic interface of any cipher. This is an interface class, i.e. it provides no implementation. Create the Cipher class in a file called Cipher.h according to the UML specification below: Cipher tencodeconst strings string edecodelcanst strings): string A cipher is an algorithm that can encode plaintext, turning it into ciphertext, as well as decode string encode[const string&) This function is abstract and must be overridden by the derived classes. The function will receive plaintext (string) as input, encrypt it, and return encrypted ciphertext (string)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!