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
Hitman42 [59]
3 years ago
5

Regarding enumerations, the ____ method returns an array of the enumerated constants.

Computers and Technology
1 answer:
Romashka-Z-Leto [24]3 years ago
6 0

Answer:

a. values

Explanation:

The values() method returns an array of all values of an enumeration. This method is defined automatically by the java compiler for the enum data type.

For example:

enum Traffic_Signal {RED,YELLOW,GREEN};

for(Traffic_Signal t : Traffic_Signal.values()){

   System.out.println(t);

}

This code segment will print out all the valid values in the Traffic_Signal enumeration.

You might be interested in
Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up t
Crank

Answer:

Here is the Python program:

import math #import math to use mathematical functions

height = float(input("Enter wall height (feet): ")) #prompts user to enter wall height and store it in float type variable height

width = float(input("Enter wall width (feet): ")) #prompts user to enter wall width and store it in float type variable width

area = height *width #computes wall area

print('Wall area: {} square feet'.format(round(area))) #displays wall area using round method that returns a floating-point number rounded

sqftPerGallon = 350 #sets sqftPerGallon to 350

paintNeeded = area/ sqftPerGallon #computes needed paint

print("Paint needed: {:.2f} gallons".format(paintNeeded)) #displays computed paint needed up to 2 decimal places

cansNeeded = int(math.ceil(paintNeeded)) #computes needed cans rounding the paintNeeded up to nearest integer using math.ceil

print("Cans needed: {} can(s)".format(cansNeeded)) #displays computed cans needed

colorCostDict = {'red': 35, 'blue': 25, 'green': 23} #creates a dictionary of colors with colors as key and cost as values

color = input("Choose a color to paint the wall: ") #prompts user to enter a color

if color in colorCostDict: #if the chosen color is present in the dictionary

    colorCost = colorCostDict.get(color) #then get the color cost from dictionary and stores it into colorCost using get method that returns the value(cost) of the item with the specified key(color)

    cost = cansNeeded * colorCost #computes the cost of purchasing paint of specified color per cansNeeded

  print("Cost of purchasing {} paint: ${}".format(color,colorCostDict[color])) #displays the real cost of the chosen color paint

print("Cost of purchasing {} paint per {} gallon can(s): ${}".format(color,cansNeeded, cost)) #displays the cost of chosen color paint per cans needed.

Explanation:

The program first prompts the user to enter height and width. Lets say user enter 20 as height and 50 as width so the program becomes:

Wall area computed as:

area = height *width

area = 20 * 50

area = 1000

Hence the output of this part is:

Wall area: 1000 square feet                                                                                                                     Next program computes paint needed as:

paintNeeded = area/ sqftPerGallon

Since sqftPerGallon = 350 and area= 1000

paintNeeded = 1000 / 350

paintNeeded = 2.86

Hence the output of this part is:

Paint needed: 2.86 gallons

Next program computes cans needed as:      

cansNeeded = int(math.ceil(paintNeeded))

This rounds the computed value of paintNeeded i.e. 2.86 up to nearest integer using math.ceil so,

cansNeeded = 3                                                                  

Hence the output of this part is:

Cans needed: 3 can(s)                                                                                                                            Next program prompts user to choose a color to paint the wall

Lets say user chooses 'blue'

So the program get the cost corresponding to blue color and multiplies this cost to cans needed to compute the cost of purchasing blue paint per gallon cans. So

cost = cansNeeded * colorCost

cost = 3 * 25

cost = 75

So the output of this part is:

Cost of purchasing blue paint per 3 gallon can(s): $75                                                                                        The screenshot of the program along with its output is attached.

5 0
3 years ago
10 sentences about computer parts.
Ahat [919]
One computer part is the CPU, it’s a piece of hardware the last allows your computer to access and interact all the applications and programs. The first ever CPU chip was invented around 4 decades ago. The keyboard is another computer part and it allows the user to type letters and numbers. There are about 104 keys on a keyboard and there are different parts in it. Some of the parts include, control keys, function keys, navigation keys, numeric keypad, and so on. A mouse is another device used with the keyboard to position the cursor. It’s a hand held device that detects two-dimensional motion relative to a surface. This motion is typically translated Into the motion of a pointer on a display, which allows a smooth control of the graphical user. Memory is a device to store all of your information and saved data. The motherboard is the backbone that tied together the computers components at one spot.
6 0
2 years ago
Although a tablet can connect to a cellular network, it cannot be used as a
Misha Larkins [42]

Answer:

A tablet can have mobile data such as MetroPCS. But the tablet can not make phone calls or texts.

7 0
3 years ago
Read 2 more answers
Nearly all social software systems include a(n) ________, which helps control your information flow.
Alekssandra [29.7K]

Answer:

dashboard

Explanation:

4 0
2 years ago
Read 2 more answers
WHAT is an UX designer? an interactive designer ? a front-end developer ? and what they do?
MatroZZZ [7]
Basically, it is an idea that has numerous measurements, and it incorporates a group of various controls, for example, cooperation outline, data construction modeling, visual configuration, convenience, and human-PC connection.

Answer: an interactive designer.


What they do?

It's about improving the experience that individuals have while communicating with your item, and ensuring they find esteem in what you're giving.



3 0
3 years ago
Other questions:
  • What are some of the potential sources of risk in a systems analysis and design project? How does the project manager cope with
    6·1 answer
  • Can someone help me with...A table can help? PLEASE
    8·1 answer
  • The "origin" of the cartesian plane in math is the point where x and y are both zero. Given a variable, origin of type Point-- a
    5·1 answer
  • Semantic search engines use NLP, contextual cues, synonyms, word variations, concept matching, specialized queries, and other st
    6·1 answer
  • What is the first priority when building or using vex robots
    10·2 answers
  • which statement is true? O A Future games will be more context oriented. OB. Future games will be more product driven. Future ga
    13·2 answers
  • Edhesive 3.4 practice 1
    9·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • Which option correctly identifies if the researcher’s approach was the best choice in the following scenario and explains why?
    10·2 answers
  • In addition to developing sketches, computer-aided design programs are used by fashion designers to perform which task?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!