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
tatuchka [14]
3 years ago
8

A class can inherit behavior from a parent but also define its own and override parent behavior. This is called:

Computers and Technology
1 answer:
masha68 [24]3 years ago
3 0

Answer:

Method overriding.

Explanation:

In object-oriented programming (OOP) language, an object class represents the superclass of every other classes when using a programming language such as Java. The superclass is more or less like a general class in an inheritance hierarchy. Thus, a subclass can inherit the variables or methods of the superclass.

Basically, all instance variables that have been used or declared in any superclass would be present in its subclass object.

A class can inherit behavior from a parent but also define its own and override parent behavior. This is called method overriding.

Method overriding occurs when there are two (2) methods with the same method parameter and name. The parent class handles one of the methods while the other is in the child class.

Hence, method overriding allows a child class to define its own specific implementation of a method and override parent behavior.

You might be interested in
Match the features of a word processing software to their corresponding functions.
padilas [110]

Answer:

Options - changes the behavior of the grammar checker

Replace - enables you to add or remove misspelled words

Change All - changes all occurrences of the misspelled words

Explain - provides the description of grammar errors

Explanation:

Let me know if this helps! :)

7 0
3 years ago
B. WAP to check whether input number is palindrome number or not using SUB...... END SUB.​
sveticcg [70]

For a number to be palindrome, the reverse of the number and the original number must be the same.

<h3>The main program</h3>

The program written in Python, where comments are used to explain each line is as follows:

#This gets input for the number

num = input()

#This reverses the number

numrev = num[::-1]

#If the reverse and the original number is the same

if num == numrev:

   #This prints Palindrome

   print("Palindrome")

else:

   #Otherwise, it prints Not palindrome

   print("Not palindrome")

Read more about Python programs at:

brainly.com/question/26497128

3 0
2 years ago
How to add if an statemement on a retrun in react js.
miv72 [106K]

Answer:

Of course, if we think about if statement in Javascript or Typescript logic, it’s the same as in every Javascript or Typescript place.

It’s just if/else like pure javascript, but in this case, we won’t talk about the normal if/else.

In react, we’ll need if statements for the one more thing, it’s the rendering.

It’s named “Conditional rendering”, but to make it simple, let’s stay with “if statement in react”.

There are the two most popular ways to use conditional rendering that we’ll see in the React.js code, and depends on a case, both of them are correct.

The first way that we can use is to define the conditional rendering directly in the components layout.

It’s quick and easy that we’ll use the most, and in some cases, it is the best for performance.

We’ll be using this way in the cases when we have only one condition, more just as “if”, when we would like to render some element when a specified condition is passed.

The second way is the function created to handle specified parts of the layout, and render it conditionally, to do that we can use not only if/else but the switch case as well.

This one way is right to use in cases where we have more conditions, especially the version with switch one.

But it fires the function anyway, so it is no sense to use it when we have one condition.

Let’s take a look at the code examples where I added both ways of doing that:

// The first example with the code inside functional component

function Parent(props) {

 return(

   <>

     {name === "Duomly" && (

       <DuomlyComponent/>  

     )}

   </>

 )

}

// The second example with the additional function

function renderComponent() {

 const name = 'Duomly';

 if (name === 'Duomly') {

   return 'Duomly';

 } else {

   return null;

 }

}

function Parent(props) {

 return renderComponent();

}

Explanation:

3 0
3 years ago
List 2 positive impacts of cybersecurity.
kupik [55]

Answer:

Protection for your business and Increased productivity

Explanation:

This is because it ensures your employees aren't at risk from potential threats and, since there no virus, the computers will work well (not slow down)

7 0
3 years ago
Read 2 more answers
What is a zener diode
V125BC [204]

a form of semiconductor diode in which at a critical reverse voltage a large reverse current can flow.
8 0
3 years ago
Other questions:
  • Why might it be a good idea to choose a bus topology?
    6·2 answers
  • Clicking this would navigate among different worksheets
    14·1 answer
  • How to write a program in java that finds the max number of an array of integers?
    6·1 answer
  • The Spanning Tree Protocol operates at the Network layer of the OSI model.
    13·1 answer
  • Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.
    15·1 answer
  • What is the first phase in which a software program is usable enough to test?
    14·1 answer
  • A typical day in programming and software development would involve
    7·1 answer
  • Help me! I’ll mark you brainly
    13·1 answer
  • Trade Periodicals are usually highly scholarly resources<br> True<br><br> False
    5·1 answer
  • What is the destination ip address when an ipv4 host sends a dhcpdiscover message?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!