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
PLATO
storchak [24]

Answer: here is the answer ☀️keep on shining☀️

Explanation:

5 0
3 years ago
Which data validation alert style should you use to prevent the user from entering invalid data?
mario62 [17]

Answer:

stop

Explanation:

If you set the error alert style to Stop, then you are asking Excel to prevent the user from typing in an invalid value.

5 0
2 years ago
What are some ways to accomplish full-duplex (FDX) digital communications on guided medium at the physical layer (OSI Layer 1)?
labwork [276]

Answer:

d. All of the above

Explanation:

Physical layer is the lowest layer of the OSI reference model that deals with the setup of physical connection to the network and with transmission and reception of signals.

Full duplex (FDx) is a bidirectional type of communication system where two end nodes send and receive data signals at the same time, and a single carrier is simultaneously used for dual communication.

To send or receive data, the participating nodes in a Full Duplex system do not have to wait for a free carrier/medium. It employs a medium that has at least two internal channels - one for sending and one for receiving.

Based on the above explanations, options A, B and C are valid and are correct ways to accomplish full-duplex (FDX) digital communications on guided medium at the physical layer (OSI Layer 1). There all of them are correct.

6 0
2 years ago
Which terms describes Benito Mussolini’s form of government
slega [8]
The political system that describes Benito Mussolini’s form of government would be totalitarian.Hope this answers the question:)
5 0
3 years ago
Read 2 more answers
Each modern computer system is equipped with a compiler. ___ .
oksano4ka [1.4K]
False, modern computers don't need to compile direct source code from users. There are DUIs (direct user interface) that allows the user to interact with a computer without coding.
6 0
3 years ago
Read 2 more answers
Other questions:
  • A technician is tasked to implement a wireless router that will have the fastest data transfer speed at 5 GHz frequency. Which o
    11·1 answer
  • Write Java program to allow the user to input the amount of deposit, yearly interest rate (percentage), and income tax(percentag
    9·1 answer
  • A user deletes a message from a mailbox while on a desktop. What happens to the email message on the user's synchronized devices
    13·2 answers
  • Which best describe a resource each student could use to find information
    6·2 answers
  • Assume we perform a known-plaintext attack against DES with one pair of plaintext and ciphertext. How many keys do we have to te
    14·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    14·2 answers
  • If you copy a drawing from the Internet and use it in a report, you might be violating the artist's
    8·1 answer
  • Logical design is tied to a specific hardware and software platform. a. True b. False
    9·1 answer
  • 1) Identify at least four examples and uses of application software.​
    5·2 answers
  • The computer stores currently used programs and data in ________.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!