Find Jobs
Hire Freelancers

C++ Project!!

$30-250 USD

In Progress
Posted over 11 years ago

$30-250 USD

Paid on delivery
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.
Project ID: 4000894

About the project

5 proposals
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Thanks for inviting me.
$100 USD in 0 day
5.0 (19 reviews)
3.8
3.8
5 freelancers are bidding on average $86 USD for this job
User Avatar
Let me help you. Check your pm for more details.
$100 USD in 2 days
5.0 (15 reviews)
3.7
3.7
User Avatar
Let me help you. Please check PMB!
$100 USD in 1 day
5.0 (12 reviews)
3.6
3.6
User Avatar
Hello, I can do this, more details in pm.
$80 USD in 1 day
5.0 (2 reviews)
2.1
2.1
User Avatar
let's start..
$50 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Alexandria, United States
4.9
34
Payment method verified
Member since Oct 18, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.