answer.
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]
2 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]2 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
Describe the output when the following code executes in 64-bit mode: .data dividend_hi QWORD 00000108h dividend_lo QWORD 3330002
iragen [17]

Answer:

RAX = 333000h (16 bits with preceding zeros removed)

RDX = 20h (also 16 bits with preceding zeros removed)

Explanation:

The "div" opcode in the assembly language source code is used to divide operands. It accepts a divisor ( the denominator) and divides the content of the AX register. The result is saved in the AX register while the remainder (if any) is saved in the DX register. If the DX register holds any data, the data is replaced with the divisor remnant.

The code above divides the content of the RAX register with the divisor variable and saves the result and remainder in the RAX and RDX respectively.

7 0
1 year ago
FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
Sholpan [36]

Answer:

Transmission Control Protocol (TCP)

Explanation:

FTP: FTP stand for File Transfer Protocol. It is an internet protocol for transferring files between computers on a computer network over TCP/IP connections. It is based on client server architecture in which a client asks for a file and the server (local or remote) sends it. FTP uses TCP to ensure all the data packets are transmitted correctly to the proper destination.

Transmission Control Protocol: It is a protocol used in the Transport Layer of the TCP/IP model. The basic role of this layer is to ensure end-to-end delivery of data from the source to the destination. TCP is a connection oriented protocol that works with the Internet Protocol and provides ordered, guaranteed and error free delivery of data from source to destination. This is how application programs communicate and exchange data through an IP network. It is connection oriented protocol means connection between client and server is setup before data transmission. At source host TCP divides streams of bytes in segments. Then it allocates sequence number to each segment. At destination end it reorders the delivered segments. Then it sends an acknowledgment  to sender as a signal that the correct segments have been received. TCP also employs error detection that ensure reliability. TCP also manages flow control and congestion control to avoid data packets loss or delay and to ensure that a sender does not send packets faster than the receiver can receive.

4 0
2 years ago
____ is a program placed on a computer without the user's knowledge that secretly collects information about the user
Scrat [10]
<span>Spyware is a program placed on a computer without the user's knowledge that secretly collects information about the user.
</span><span>The spyware gathers information and can send this information to another program or entity which can take control over the device or use personal information to harm the user. </span>
7 0
2 years ago
In its simplest form, communication is defined as ________.
kykrilka [37]

Answer: c)-the transmission of information and meaning from a sender to a receiver

Explanation: Communication is describes as the transmitting the information along with meaning from source to destination. The source is sender from where the information is sent and receiver is the destination unit to receive  the information .Information that is being sent contains structured, organized and meaningful facts and figure.

Other options are not appropriate because information and meaning both are transferred in communication ,data is not transferred in communication as they are raw and unstructured facts and ideas are not conveyed in communication.Thus, the correct option is option(c).

5 0
2 years ago
Each of these is a basic type of a touch screen, except ________.
Oksanka [162]
<span>A touch screen gives response and acts simply with a touch on the screen area. Reflective screen is not a basic type of touch screen. The reflection can be reduced for the touch screen when it is combined with the LCD and the screen still be very visible. These screens can be anti glare and safe to the eyes.</span>
8 0
2 years ago
Read 2 more answers
Other questions:
  • Which statement regarding dialogues in multiplayer games is true? Dialogues are based only on players’ actions.
    7·2 answers
  • PLEASE HELP!! WILL GIVE BRAINLIEST!!
    15·2 answers
  • The ________ program displays graphics and loading screens during the boot process.
    8·1 answer
  • #Remember that Fibonacci's sequence is a sequence of numbers
    14·1 answer
  • Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the givenprogram:Gus Bob Zoeshort_names
    13·1 answer
  • Write a loop that counts the number of space characters in a string. Recall that the space character is represented as ' '.
    11·1 answer
  • You are modeling a small part of an online flight reservation system, according to the following description. A flight is a sing
    11·1 answer
  • Information systems cannot solve some business problems. Give three examples and explain why technology cannot help.
    11·1 answer
  • Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, print "To
    9·1 answer
  • Describe a strategy for avoiding nested conditionals. Give your own example of a nested conditional that can be modified to beco
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!