Find Jobs
Hire Freelancers

C++ Project!!

$30-250 USD

Em Andamento
Publicado há mais de 11 anos

$30-250 USD

Pago na 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 do Projeto: 4000894

Sobre o projeto

5 propostas
Projeto remoto
Ativo há 11 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
Thanks for inviting me.
$100 USD em 0 dia
5,0 (19 avaliações)
3,8
3,8
5 freelancers estão ofertando em média $86 USD for esse trabalho
Avatar do Usuário
Let me help you. Check your pm for more details.
$100 USD em 2 dias
5,0 (15 avaliações)
3,7
3,7
Avatar do Usuário
Let me help you. Please check PMB!
$100 USD em 1 dia
5,0 (12 avaliações)
3,6
3,6
Avatar do Usuário
Hello, I can do this, more details in pm.
$80 USD em 1 dia
5,0 (2 avaliações)
2,1
2,1
Avatar do Usuário
let's start..
$50 USD em 3 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
Alexandria, United States
4,9
34
Método de pagamento verificado
Membro desde out. 18, 2012

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos 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)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.