subject

Acolor class has a method getcolorname that returns a string corresponding to the common name for the color, e. g., yellow, blue, white, etc. if there is no common name associated with the color, null is returned. the class, alphachannelcolor—a subclass of color—has an int instance variable, alpha, containing the alpha channel value, representing the degree of transparency of the color. write the method getcolorname of alphachannelcolor, that overrides the method in the color class. alphachannelcolor's getcolorname should return the name of the color (obtained from the getcolorname method of color) prefixed with the word "opaque" if the alpha value is less than 100, "semi-transparent" if the alpha value is otherwise less than 200, and "transparent" otherwise (separate the prefix from the color name by a blank). if the color has no name, the method should return "opaque color," "semi-transparent color," or "transparent color," according to the same alpha values as above.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 04:30
What is the process in which the software development team compiles information to determine the final product
Answers: 1
question
Computers and Technology, 24.06.2019 08:20
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
question
Computers and Technology, 25.06.2019 04:40
Ineed ! i need a computer whiz to me complete my study guide on computers, it's 50 questions. if anyone can me i'll be greatly appreciated.
Answers: 1
question
Computers and Technology, 25.06.2019 06:00
If an image has only 4 colors, how many bits are necessary to represent one pixel’s color?
Answers: 1
You know the right answer?
Acolor class has a method getcolorname that returns a string corresponding to the common name for th...
Questions
question
Mathematics, 02.01.2020 13:31
Questions on the website: 13722361