1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VLD [36.1K]
4 years ago
11

A Color 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 integer 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 the the same alpha values as above.
Computers and Technology
1 answer:
Mashutka [201]4 years ago
6 0

Answer:

public String getColorName() {

String name = super.getColorName();

if (name == null) name = "color";

if (alpha < 100)

return "opaque " + name;

else if (alpha < 200)

return "semi-transparent " + name;

return "transparent " + name;

}

You might be interested in
Which are elements involved in diagramming a solution? Choose all that apply.
katovenus [111]

Answer:

1) showing a visual graphic of the solution

3) showing the flow of information through the solution

4) showing decision points

5) showing the path of information to decision points

Explanation:

 I'm sure this is the answer!!

4 0
3 years ago
The blank areas around the outside edges of a document are called the _____. a. settings b. margins c. blank space d. empty spac
nevsk [136]

I think it will be B margins

7 0
3 years ago
Help asap please!
Fynjy0 [20]

Answer:

C) steel

Explanation:

Steel is stiff and can't bend

-_- too difficult lol

3 0
3 years ago
Write any three primary activities of a program??​
katrin2010 [14]

Answer:

Input, Processing, and Output

Explanation:

Hope it helps you..

Your welcome in advance..

(◍•ᴗ•◍)

4 0
3 years ago
What's the drawback of using Screened Subnet (DMZ)?
lesantik [10]

It's more expensive, it's more difficult to configure and maintain and it can be more difficult to troubleshoot

4 0
4 years ago
Other questions:
  • To create a formula in ____, you would first click in one of the cells.
    15·2 answers
  • The use of quick styles is a great way to save _____.
    6·1 answer
  • What cell address indicates the intersection of the first row and the first column in a worksheet?
    15·2 answers
  • The availability of the appropriate compiler guarantees that a program developed on one type of machine can be compiled on a dif
    9·1 answer
  • Although designed to support remote dial-in access to a corporate network, what service below is commonly used with 802.1x port
    12·1 answer
  • The editing of digital photos us about the same level of difficulty as editing an analog photo
    12·1 answer
  • The result of processing data ​
    10·1 answer
  • Which JavaScript defense restricts a JavaScript downloaded from Site A from accessing data that came from Site B?
    6·1 answer
  • Sharon's company has written a new computer program, and she has been asked to find a way to prevent people from copying the sof
    10·1 answer
  • Accessibility is the degree to which a product or service is readily available and usable by _____.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!