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
alexdok [17]
2 years ago
15

Zohan uses the following analogy to describe a concept of object-oriented programming. A button can have many uses. When it is p

ressed, it can cause a variety of different outcomes, such as opening a door or changing the volume. But you don't need to know what the button is going to do in order to operate it-you just push it. Which concept is he most likely talking about?
a) polymorphism
b) inheritance
c) encapsulation
d) overriding
​
Computers and Technology
1 answer:
Vika [28.1K]2 years ago
4 0

Answer:

Polymorphism

Explanation:

You can have a basic button class that gets inherited by other classes.

class Button {

function pushButton(){}

}

class ElevatorButton extends Button{};

class BigRedButton extends Button{};

With these new classes, they inherit from the basic button class. They can decide what happens when the method pushButton() is called.

You don't need to worry about what pushButton() actually does, you can just call it if the object is of the type "Button" and you can expect it to work.

You might be interested in
Modify the list according to the following: append the smallest value at the end of the list when all numbers in the list are ne
ddd [48]

Answer:

The solution code is written in Python 3:

  1. def modifyList(listNumber):
  2.    posCount = 0
  3.    negCount = 0
  4.    for x in listNumber:
  5.        if x > 0:
  6.            posCount += 1
  7.        else:
  8.            negCount += 1
  9.    
  10.    if(posCount == len(listNumber)):
  11.        listNumber.append(max(listNumber))
  12.    
  13.    if(negCount == len(listNumber)):
  14.        listNumber.append(min(listNumber))
  15.    
  16.    print(listNumber)
  17. modifyList([-1,-99,-81])
  18. modifyList([1,99,8])
  19. modifyList([-1,99,-81])

Explanation:

The key step to solve this problem is to define two variables, posCount and negCount, to track the number of positive value and negative value from the input list (Line 2 - 3).

To track the posCount and negCount, we can traverse through the for-loop and create if else statement to check if the current number x is bigger than 0 then increment posCount by 1 otherwise increment negCount (Line 5- 9).

If all number in the list are positive, the posCount should be equal to the length of the input list and the same rule is applied to negCount. If one of them happens, the listNumber will append either the maximum number (Line 11 -12) or append the minimum number (Line 14-15).

If both posCount and negCount are not equal to the list length, the block of code Line 11 -15 will be skipped.

At last we can print the listNumber (Line 17).

If we test our function using the three sets of input list, we shall get the following results:

[-1, -99, -81, -99]

[1, 99, 8, 99]

[-1, 99, -81]

3 0
3 years ago
Which part of the computer contains logic circuity which interrupts instructions from a program​
poizon [28]

Answer:

The control unit of the CPU contains circuitry that uses electrical signals to direct the entire computer system to carry out stored program instructions.

Explanation: The control unit does not execute program instructions rather, it directs other parts of the system to do so.

6 0
3 years ago
Steps for turning off two step verification on ,for example, iPhones.
Tems11 [23]

Answer:

Step 1: Visit iCloud.com and log in with your Apple ID and password

At the same time, a window also pops up on iDevice

you need to click "Allow"

Copy the code from your phone to icloud.com

Step 2: Once signed in, select Settings on homepage

Step 3: Click "Manage" Apple ID.

Step 4: You will be directed to another site – appleid.apple.com

input your password to log in and verify it with Apple ID verification code.

Step 5: Then you will enter the manage page.

Click "Edit" in Security column.

Step 6: Click "Turn Off Two-Factor Authentication"

then confirm it.

Step 7: Then you need to select your security questions and answer them

click "Continue" after confirming your birthday and rescue email.

After all of these steps, you have turned off two factor authentication for Apple ID successfully.

Source : https://www.imobie.com/guide/anytrans/how-to-turn-off-two-step-verification-in-icloud.htm

8 0
3 years ago
Which of the following is NOT a common grammar adjustment which is identified by grammar-check software?
Sedbober [7]

Answer:

Shortened versions of phrases Ex:(l ol, s mh, i dk, ect.)

Explanation:

Hope that this helps, if you have any more question please feel free to contact me, hope you have an amazing rest of your day. ;D

7 0
2 years ago
Coordination in a global information system requires a _____ architecture for data, standardization within departments.
Phantasy [73]

Coordination in a global information system requires a decentralized architecture for data, standardization within departments

6 0
2 years ago
Other questions:
  • Describe network in terms of the class computer lab
    14·1 answer
  • The operating system of a computer is an example of ________ software. science-forum
    7·1 answer
  • Analyze the following code. // Program 1: public class Test { public static void main(String[] args) { Object a1 = new A(); Obje
    5·1 answer
  • write a program that asks the user to enter a positive integer, then prints a list of all positive integers that divide that num
    6·1 answer
  • The operating system provides a ____, which is the means with which you interact with the computer
    5·1 answer
  • ______involves encoding information using fewer bits than the original representation Group of answer choices
    6·1 answer
  • Beyond adding equations, what else does the Insert Equation feature allow users to do?
    7·1 answer
  • The World Health Organization decided that addiction to video games is considered a mental health disorder. Do you agree or disa
    10·1 answer
  • I need to calculate the % of Grand Total on Microsoft Excel, but can't for the life of me remember how to do that. Help would be
    8·1 answer
  • Name various input and output devices used with computers.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!