Find Jobs
Hire Freelancers

a C++ program that implements a few common operations that involve a simple cipher engine – primarily addition, keys_transfer, assignment and printing to the standard output.

$30-250 USD

Terminado
Publicado hace alrededor de 7 años

$30-250 USD

Pagado a la entrega
Following up the partA and partB of this project, the code of project 1 need to implement operator overload and error handling. The header file has been slight modified accordingly. The memory of private data string need to be dynamic allocated. In part B, LCR has been introduced to encrypt the data string. In order to decrypt the data string, modulus inverse method is often used. (refer to [login to view URL] ). A simple method such as extensive search can easily solve the inversion. For example: if when the encryption ‘f’ is ciphered to ‘c’. During decryption, the code can simply scan from ‘a’ all the way to ‘space’ and check which one can be encrypted to ‘c’ by using the same keys values. The header file has been provide as below: // File name: LCR_Ciper.h // Description: Header file for LCR // Date: 2/14/2017 // #include <iostream> #include <iomanip> #include <stdlib.h> #include <fstream> using namespace std; class LCR_cipher { Spring 2017 2 // overload operator<< to print context to console friend ostream& operator<<(ostream& out, LCR_cipher& m); public: // Constructor: allocate memory to save context and keys LCR_cipher(char *context_string, char *keys_string); // Copy constructor: LCR_cipher(const LCR_cipher& other); // Destructor: deallocate memory that was allocated dynamically ~LCR_cipher(); //check whether *keys string has valid LCR encryption value bool iskeysOK(); //check whether the context string is encrypted or not bool isencrypted(); //Retrieve CLR encryption value from *keys string void getkeys(int& a, int& c); // output the *context to console void output_context(); //using operator ++ to encrypt context string LCR_cipher& operator++(); //using operator -- to unencrypt context string LCR_cipher& operator--(); //Assignment operator overload LCR_cipher& operator=(const LCR_cipher& other); …… all the other operators….. private: char *context; //array to store context string char *keys; //array to store encryption keys bool encrypted; //whether string in *context is encrypted or not }; // End class // End header file For this project, you should overload the following night operators: Overloaded function Action ++ Using keys to encrypt the context -- Using keys to decrypt the context = For A=B, instance A will have same context and keys as instance B < For A<B, instance A will get keys from instance B + If two instances have same keys values, the context of A and B can be concatenate sequentially += If two instances have same keys values, concatenate the context of A and B and assign to a third instance == Test if the unencrypted context of A and B are same or not != Test if the unencrypted context of A and B are different or not << Output the context to console Exception handling: Your implementation should use try, throw, and catch to handle exceptions. (See C++ Interlude 3 in the textbook.) At a minimum, your code should take care of the following three cases: 1. Trying to create LCR_cipher object without valid context and keys, such as empty string. 2. If new returns NULL when allocating memory for data. 3. If the program attempts to add two instance with different keys. File naming conventions: The name of your header (“specification”) file must be exactly LCR_cipher.h, and the name of your source (“implementation”) file must be exactly LCR_cipher.cpp. This latter file must contain your implementation of the ADT. Separate client files will be posted in Canvas, for use in testing your code. These client files will have names similar to [login to view URL], [login to view URL], etc., and each of these will contain a main() function.
ID del proyecto: 13133371

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 7 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hello. How are you. I have read and understood the project. I'm an Expert in Data Structures and Algorithms. And I know well ; Java ,C/C++, Python ,PHP. I'm interested this project. So, firstly I want to discuss with you about this project. Then I'll be happy. I wait for your good reply. Thanks.
$90 USD en 2 días
4,9 (125 comentarios)
6,2
6,2
4 freelancers están ofertando un promedio de $133 USD por este trabajo
Avatar del usuario
Dear client, how are you? I am a C/C++ programmer and mathematician. Please check my "Profile & Work List" and contact with me if my skill is in your concern. Looking forward to your response. Thanks.
$300 USD en 3 días
5,0 (70 comentarios)
7,4
7,4
Avatar del usuario
Dear client i can provide complete solution on your project as i have executed it before. My commitment lies in honesty, integrity, ethical code of conduct, efficiency and speedy respond, i love to work hard to meet the deadlines and take a project to the next level. Do not hesitate to contact me to discuss your project in details and determine how my skills will positively contribute to you. Let my service makes a positive and lasting impression.
$30 USD en 1 día
0,0 (1 comentario)
2,8
2,8

Sobre este cliente

Bandera de UNITED STATES
Washington, United States
5,0
1
Forma de pago verificada
Miembro desde feb 16, 2017

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.