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, 22.06.2019 07:30
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
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, 28.12.2020 05:50
question
History, 28.12.2020 05:50
question
English, 28.12.2020 05:50
Questions on the website: 13722362