Find Jobs
Hire Freelancers

C++ Project!!

$30-250 USD

En curso
Publicado hace más de 11 años

$30-250 USD

Pagado a la entrega
Project Description: C++ assignment . test it in microsoft virtual studio to make sure it runs before you send it back to me Attached Code: 0 0 0 5 10 -5 2 3 -4 -10 5 10 0 -10 5 5 -2 0 (Chavez Siles, Feraidon, Nguyen, Walsh) Create a class called "RGB" for representing the RGB color code of any color. Include the following: 1) Attributes (all integers): a number from 0 to 255 for each of red (R), green (G), and blue (B). 2) Default constructor: all attributes are set to zero. 3) Initial value constructor. 4) Accessors and mutators for all attributes. 5) A method for calculating the "distance" between two points. The smaller the distance, the more similar two colors are. This is done by representing R, G, and B as the x, y, and z coordinates in a 3D coordinate system. Overload an operator if you'd like. 6) A method for converting the RGB values of a color into their hexadecimal equivalent. For each color, you're essentially converting 3 base-10 numbers into 3 base-16 numbers. The best way to do this is to represent the hexadecimal equivalent as a character array. However, the array has to be dynamic, both in the main function and in the method. Use the following as a guide: #include using namespace std; char *myfun(int R, int G, int B); int main() { int red=255, green=255, blue=255; char *hex_equiv; hex_equiv = new char[6]; hex_equiv = myfun(red,green,blue); cout<<hex_equiv[0]<<hex_equiv[1]<<hex_equiv[2]<<hex_equiv[3]<<hex_equiv[4]<<hex_equiv[5]<<endl; return 0; } char *myfun(int R, int G, int B) { char *hex; hex = new char[6]; hex[0] = 'F'; hex[1] = 'F'; hex[2] = 'F'; hex[3] = 'F'; hex[4] = 'F'; hex[5] = 'F'; return hex; } The attached file contains 6 integers: the R, G, and B values for color 1, and the values for color 2. Read the data and create a formatted output file with the R, G, and B values for each color, their hexadecimal equivalents, and the distance between the two colors.
ID del proyecto: 4000894

Información sobre el proyecto

5 propuestas
Proyecto remoto
Activo hace 11 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
Thanks for inviting me.
$100 USD en 0 día
5,0 (19 comentarios)
3,8
3,8
5 freelancers están ofertando un promedio de $86 USD por este trabajo
Avatar del usuario
Let me help you. Check your pm for more details.
$100 USD en 2 días
5,0 (15 comentarios)
3,7
3,7
Avatar del usuario
Let me help you. Please check PMB!
$100 USD en 1 día
5,0 (12 comentarios)
3,6
3,6
Avatar del usuario
Hello, I can do this, more details in pm.
$80 USD en 1 día
5,0 (2 comentarios)
2,1
2,1
Avatar del usuario
let's start..
$50 USD en 3 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Alexandria, United States
4,9
34
Forma de pago verificada
Miembro desde oct 18, 2012

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.