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
sasho [114]
2 years ago
6

A Color class has a constructor that accepts three integer parameters: red, green and blue components in the range of 0 ... 255

with 0 representing no contribution of the component and 255 being the most intense value for that component. The effect of full or semi-transparency can be achieved by adding another component to the color called an alpha channel. This value can also be defined to be in the range of 0...255 with 0 representing opaque or totally non-transparent, and 255 representing full transparency. Define a class AlphaChannelColor to be a subclass of the Color class. AlphaChannelColor should have the following: - an integer instance variable alpha - a constructor that accepts four parameters: red, green, blue and alpha values in that order. The first three should be passed up to the Color class' constructor, and the alpha value should be used to initialize the alpha instance variable. - a getter (accessor) method for the alpha instance variable
Computers and Technology
1 answer:
Likurg_2 [28]2 years ago
6 0

Answer:

The following are the code in the Java Programming Language.

//define a class and inherit the other class

public class AlphaChannelColor extends Color {

//define constructor and pass arguments

public AlphaChannelColor(int red, int green, int blue, int alpha) {

super(red, green, blue);

this.alpha = alpha;

}

//define function

public int getAlpha()

{

return alpha;

}

//declare a private type variable

private int alpha;

}

Explanation:

<u>The following are description of the program</u>.

  • Firstly, define a class 'AlphaChannelColor' that inherits the other class that is 'Color' through the extend keyword.
  • Define the constructor (in Java, the class name and the name of the constructor remain same) and pass four integer data type arguments 'red', 'green', 'blue' and 'alpha' in its parameter.
  • Define the integer data type function 'getAlpha()' that returns the value of the variable 'alpha'.
You might be interested in
Jane is designing a print brochure for a retail company. She’s having trouble deciding on the page margin. Which best practice w
8090 [49]

I think the answer will be C

7 0
2 years ago
Read 2 more answers
​<br><br> Access from and output to the register is slow true false​
Nataly_w [17]

Answer:

false

Explanation:

it depends most of time so false

4 0
2 years ago
Give a proof for each statement.
Marrrta [24]

Answer:

  • If a group of 9 kids have won a total of 100 trophies, then at least one of the 9 kids has won at least 12 trophies.
  • If a person buys at least 400 cups of coffee in a year, then there is at least one day in which the person has bought at least two cups of coffee.
  • The average of three real numbers is greater than or equal to at least one of the numbers.

Explanation:

1)

Suppose that  each kid has less than 12 trophies

Total trophies = 100

Maximum trophies won by one kid = 11

total kids = 9

total number of trophies = 9 * 11 = 99 which contradicts the fact the total number of trophies are 100

2)

Suppose that  person has less than 2 cups of coffee a day

Total cups of coffee = 400

he has bought at least one cup of coffee each day

which means

total number of cups of coffee = 1* 366 = 366 which contradicts the fact the person buys at least 400 cups of coffee in a year

3)

Average of three number = (a+ b+ c)/3

suppose that there are real numbers a, b, and c such  that all three numbers are less than the average of the three numbers.

Let m be the average (a+b+c )/3 = m. Then our assumption states that (a < m) and  (b < m) and (c < m). By adding all the inequalities we get a + b + c < 3m. But m is  defined to be (a+b+c) /3  , so a + b + c = 3m.  But now we have that 3m = a + b + c < 3m. So 3m < 3m which is an obvious  contradiction. Thus our claim is true

7 0
2 years ago
Which role is delegated to personnel of the IT department and is responsible for maintaining the integrity and security of the d
enyata [817]

Correct question.

Which role is delegated to personnel of the IT department and how is responsible for maintaining the integrity and security of the data?

Answer:

<u>data custodian</u>

<u>Explanation:</u>

Remember, every organization generates data, and large organizations generate even larger data.

Hence, the role of a data custodian in an organization requires He implements measures to protect the organization's data, store and backup the data, as well as granting access to the data to authorized persons when needed.

3 0
2 years ago
Write code which takes a user input of a String and an integer. The code should print each letter of the String the number of ti
il63 [147K]

import java.util.*;

public class myClass {

public static void main(String args[]) {

Scanner scan = new Scanner(System.in);

System.out.print("Input a String: ");

String str = scan.nextLine();

System.out.print("Input an integer: ");

int num = scan.nextInt();

for(int i=str.length()-1; i>=0; i--) {

for(int j=0; j<num; j++) {

System.out.print(str.charAt(i));

}

}

}

}

8 0
2 years ago
Other questions:
  • An analyst receives an alert from the SIEM showing an IP address that does not belong to the assigned network can be seen sendin
    9·1 answer
  • Instructions:
    14·1 answer
  • Which of the following facts determines how often a nonroot bridge or switch sends an 802.1D STP Hello BPDU message?
    14·1 answer
  • Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha
    7·1 answer
  • The relational model describes data using a standard tabular format; all data elements are placed in three-dimensional tables ca
    5·1 answer
  • JAVA
    5·1 answer
  • Write a program that has the following String variables: firstName, middleName, and lastName. Initialize these with your first,
    7·1 answer
  • Write code that determines the number of full days represented by the number of hours stored in the variable hours and stores th
    15·1 answer
  • On the Direct Marketing worksheet, create appropriate range names for Design Fee (cell B8), Cost Per Ad (cell B9), Total Clicks
    15·1 answer
  • Ali has created a small program in Python, but he wants to store his data in a multi-dimensional array. He would like to use adv
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!