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 magazie can help the public determine the best technology to use
wariber [46]
Well you can read about technology in maybe tec company magazines like apple magazines or samsung magazines on which are best to buy Hope this helps:)
3 0
4 years ago
write a python function that takes the largest and smallest numbers in a list, and swap them (without using min() or max() )
Akimi4 [234]

Answer:

def SwapMinMax ( myList ):

   myList.sort()

   myList[0], myList[len(myList)-1] = myList[len(myList)-1], myList[0]

   return myList

   

Explanation:

By sorting the list, you ensure the smallest element will be in the initial position in the list and the largest element will be in the final position of the list.

Using the len method on the list, we can get the length of the list, and we need to subtract 1 to get the maximum element index of the list.  Then we simply swap index 0 and the maximum index of the list.

Finally, we return the new sorted list that has swapped the positions of the lowest and highest element values.

Cheers.

8 0
3 years ago
Defeating authentication follows the method–opportunity–motive paradigm.
sashaice [31]

Answer:

Method:- This is related to hackers technique and way of accessing to copy other data. It also includes the skill, knowledge, tools and other things with which to be able to pull off the attack.

Opportunity:- this is related to how a user gives way to access to the hackers. It includes the time, the chance, and access to accomplish the attack.

Motive:- This may relate to the hacker to destroy the reputation of another or for money. It is reason to want to perform this attack against this system

3 0
3 years ago
Which file extension indicates that a file is an Adobe Acrobat document?
Mkey [24]

Answer:

PDF (Portable Document Format)

Explanation:

The PDF file extension indicates that a file is an Adobe Acrobat document. Adobe developed a file format called Portable Document Format (PDF) in the 1990s to display documents that can include images, text, links, buttons, audio, video, form fields etc in such a way that it is not dependent on a specific Operating system, software or hardware.  

The PDF file extension is cross-platform which means that the PDF file can be viewed on any Operating System such as Windows, Linux, macOS, Android, IOS etc.

8 0
3 years ago
Have all of my coins because i will delete acount there will be part 2, 3 , 4 ,5,6,7,8
kirza4 [7]
Thank you very much your are awesome
3 0
3 years ago
Read 2 more answers
Other questions:
  • Is it bad to leave a co2 cartridge in an airsoft pistol?
    6·2 answers
  • Which is the most important reason you should properly cite information that you obtain from an Internet search? Question 2 opti
    8·1 answer
  • What is deshtop in desktop publishing
    11·1 answer
  • Which osi reference model layer includes all programs on a computer that interact with the network?
    13·1 answer
  • Alto Innovations creates custom software for organizations. The company's managers want to build a high-performance culture in t
    11·1 answer
  • if you are trying to reduce your debt, which of these expenses should you consider cutting out or cutting back on first?
    11·1 answer
  • Can anyone fill in the space please
    6·1 answer
  • Order the steps for accessing the junk email options in outlook 2016
    14·1 answer
  • People who rely on others for financial support, such as children and the elderly, are referred to as 16 O A. recipients O B. be
    9·1 answer
  • Real life example of hexadecimal and octal decimal “for example in binary light switch”
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!