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]
3 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]3 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
Identify 3 distractions for young drivers and explain how you plan to minimize these distractions.
Rom4ik [11]
1 distraction is phones , texting and driving . They could have a system in their car which activated by a voice assistant who could do it al for them
4 0
3 years ago
It's 50 points.
Mashutka [201]

Answer:

When I was younger I had a dream about being popular for my studies. everyone knew that I worked hard and devoted to studies. Two years ago I took an admission to a different school, no one knew I studied well how I hittin famous was quite unique. It was hard for students to carry textbooks, a rule was made for textbooks to be in a cupboard. I was the monitor of the cupboard and had keys for it. once in my mathematics class my classmates were shouting my name "SALENA! SALENA! so I would give them there books. maam out of frustration asked "Who is SALENA!? I raised my hand from behind maam in an embarrassed manner. My teacher noticed me and realized I'm a brilliant student.

Explanation:

I hope you have a nice! I tried to shorten it has much as I could. I hope this helps you!

3 0
3 years ago
Read 2 more answers
What are the charactaristic of computer with virus​
NISA [10]

Explanation:

One of the main characteristics of computer viruses is related to the fact that they are programs created by hackers that attack the code of a computer, infecting files on the computer's hard drive or its source code. Once the virus has been copied onto the computer, it can contaminate other computers that come into contact with the machine.

5 0
2 years ago
Read 2 more answers
You have recently subscribed to an online data analytics magazine. You really enjoyed an article and want to share it in the dis
creativ13 [48]

Select All that apply

Answer:

These are the things that are would be appropriate in a post.

B. Checking your post for typos or grammatical errors.

C. Giving credit to the original author.

D. Including your own thoughts about the article.

Explanation:

The correct answer options B, C, and D" According to unofficial online or internet usage it is believed that sharing informative articles is a reasonable use of a website forum as much the credit goes back to the actual or original author. Also, it is believed that posts should be suitable for data analytics checked for typos and grammatical errors.

7 0
2 years ago
What is data and instructions entered into the memory of a device
lyudmila [28]

A POINTING DEVICE IS AN INPUT DEVICE THAT ALLOWS A USER TO CONTROL A POINTER ON THE SCREEN. ... A KEYBOARD IS AN INPUT DEVICE THAT CONTAINS KEYS USER TO ENTER DATA AND INSTRUCTIONS INTO A COMPUTER.                                                                            

SORRY FOR CAPS MY CAPS KEY GOT STUCK

3 0
3 years ago
Other questions:
  • What will be a fundamental aspect of future games??
    12·2 answers
  • IF YOU KNOW THE ANSWER TO THIS PLEASE ANSWER ASAP
    12·1 answer
  • Write a for loop to verify that your function is correctly returning the expected output for the radius values between 0 and 11.
    14·1 answer
  • Which of the following websites is least biased
    12·1 answer
  • What type of machine is a hand drill?<br><br> A. Simple machine <br> B. Compound machine
    8·2 answers
  • Plz hurry it’s timed
    5·1 answer
  • This image shows a web designer's grids for different pages on a website. The uppermost box on each page is the website's identi
    14·2 answers
  • What are 2 ways computers can connect to a network?
    5·1 answer
  • Why would over-50 executives have a harder time buying into the idea of social media?​
    15·1 answer
  • This provides an easy method for workers to use their computers. FAT FAT RAM RAM DOS DOS GUI
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!