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
malfutka [58]
3 years ago
14

"The ability to create methods with the same name that are in different classes" is known as ________.

Computers and Technology
1 answer:
Jlenok [28]3 years ago
6 0

Answer:

Polymorphism

Explanation:

Polymorphism is the ability of an object to take multiple forms. It is an important concept of Object Oriented Programming. Polymorphism is used in Object Oriented Programming when a reference of a parent class is used to refer to a child class object. It allows to perform a single action in different ways. For example a person can possess different characteristics at the same time. A person can be a father, husband, employee or student. The same person can have different behaviors in different circumstances.

Example:

Suppose there is class Animal with a procedure sound(). This method can have different implementation for different animals. For this purpose lets take two derived classes Cow and Cat that extend the Animal class (parent/base class). Now the method sound() can be used in different ways for Cow and Cat.

public class Animal{

public void sound(){

System.out.println("Animal is making a sound");  } }

public class Cat extends Animal{

 public void sound(){

  System.out.println("Meow");     } }

The output is Meow. The same method sound() is used for cat subclass.

public class Cow extends Animal {

  public void sound(){

    cout<<"Mooo";  }}

The output is Mooo. The method sound() is used for a Cow subclass which returns the sound of Cow in output.

So the same function i.e. sound() behaves differently in different situations which shows Polymorphism.

Polymorphism has 2 types.

One is compile time polymorphism which is called overloading. In method overloading a class can have more than one functions with same name but different parameters. Methods can be overloaded by change in number or type arguments. For example overloading a function method() can take the following forms in which the name remains the same and parameters are different.

void method(int a)

void method(float a)

void method(float a, float b)

Second type is run time polymorphism which is called overriding. Method overriding is when a method declared in derived class is already present in base class. In this way derived/child class can give its own implementation to base/parent class method. Method present in base class is called overridden and that in subclass is called overriding method. The example of Animal Cow and Cat given above is an example of overriding.

You might be interested in
A __________ search engine focuses on a specific subject.<br><br>answer : Specialized
natita [175]

Answer:

Specialized fr just want point lol

Explanation:

5 0
3 years ago
Which options are available when a user modifies a recurring appointment? Check all that apply. Open this occurrence Open the fi
Rus_ich [418]

Open this occurence and open the series is the two options to choose from, from the dialog box that shows when attempting to modify the appointments

4 0
3 years ago
Read 2 more answers
Question 1
Alexxandr [17]

Explanation:

so, what do you think ?

I am sure you have used a computer or a smart phone yourself.

how many clicks or taps do you want to do before you you get what you were looking for ?

hmmmm ?

as few a possible, right ?

ideally, of course, this is one (1) click or tap.

7 0
2 years ago
Which of the following is not a legal identifier?
Paraphin [41]

Answer:

321Go

Explanation:

The identifiers in C, C++, C#, Java and other programming languages are a combination of letters, numbers and the underscore symbol.  The laters versions of C and C++ allows you to use almost all Unicode characters. In Java, you can use also the dollar sign.

From that you have to be careful to follow these rules:

-Don't use keywords.

-Don't include white spaces.

-Don't use operators.

-Don't repeat identifiers.

-Don't start your identifier with a number.

-Don't use two consecutive underscores.

So app_234, happyTimesAhead, and cis22B are follo wing these rules but 321Go starts with a number.

4 0
3 years ago
Se que esto no tiene que ver con ninguna materia pero porque en instagram me sale por ejemplo que han visto 10 personas Y cuando
abruzzese [7]

Answer:

Bueno, realmente no entendí lo que dijiste, pero, ¿podrías decirlo donde puedo ayudarte?

7 0
3 years ago
Other questions:
  • Which of these can expose a computer to a virus? Check all that apply.
    9·2 answers
  • Your personality is that of everyone else
    15·2 answers
  • Hotels and motels that are part of a ________ share a centralized reservation system and a common image, logo or advertising slo
    7·1 answer
  • Which character is often used to identify registered trademarks and is available on the Insert tab and Symbols
    5·1 answer
  • Egyptian hieroglyphs were part of a writing system used by the ancient Egyptians. What type of graphic design elements did they
    13·1 answer
  • Disadvantages of Batch<br>operation system​
    5·1 answer
  • Write an app that reads an integer, then determines and displays whether the integer is odd or even. [Hint: Use the remainder op
    10·1 answer
  • If you want to insert a table which ribbon should you select
    13·2 answers
  • Task #3 Debugging a Java Program
    14·1 answer
  • Para ti que es el sexting​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!