A Color class has three integer color component instance variable: red, green, and blue. Write a toString method for this class . It should return a string consisting of the three color components (in the order red, green, blue) within parentheses, separated by commas, with a ‘#’ prefix e.g. #(125, 30, 210)

LANGUAGE: JAVA

CHALLENGE:

A Color class has three integer color component instance variable: red, green, and blue.
Write a toString method for this class . It should return a string consisting of the three color components (in the order red, green, blue) within parentheses, separated by commas, with a ‘#’ prefix e.g. #(125, 30, 210)

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,