subject

#include #include
#include
#include
using namespace std;
class cypher_encryptor
{
string cypher;
public:
cypher_encryptor(string cypher)
{
this->cypher = cypher;
}
string encode(string original)
{
string result = original;
for (int i = 0; i < original. length(); i++)
{
if (original[i] == ' ') continue;
result[i] = cypher[original[i] - 'a'];
}
return result;
}
string decode(string secret)
{
string result = secret;
for (int i = 0; i < secret. length(); i++)
{
if (secret[i] == ' ') continue;
for (int j = 0; j <= 26; j++)
{
if (cypher[j] == secret[i])
{
result[i] = j + 'a';
}
}
}
return result;
}
};
class hacker
{
//Returns for each character the number of times it appears in the string
map* count_letters(string phrase)
{
// Your code starts here
// Your code ends here
}
//Returns for each count the characters that appears that number of times in the string
map>* by_counts(map counts)
{
// Your code starts here
// Your code ends here
}
public:
//Calculates the cypher using phrase as a reference and encoded
string get_cypher(string phrase, string encoded)
{
// Your code starts here
// Your code ends here
}
};
//After

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Append and make table queries are called queries. select complex simple action i think action
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Text or graphics that print at the bottom of every page are called footings footers headers headings
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 2
You know the right answer?
#include #include
#include
#include
using namespace std;
class cypher_en...
Questions
question
Arts, 03.02.2020 09:47
question
Mathematics, 03.02.2020 09:47
Questions on the website: 13722359