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
Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
Kipish [7]

Answer:

code = 010100000001101000101

Explanation:

Steps:

The inequality yields 2^{k} - 1 > = M+K, where M = 16. Therefore,

The second step will be to arrange the data bits and check the bits. This will be as follows:

Bit position              number              Check bits            Data Bits

21                                   10101

20                                  10100

The bits are checked up to bit position 1

Thus, the code is 010100000001101000101

3 0
3 years ago
Read 2 more answers
What would be the best thing you could do to prepare yourself to work for a company that has embraced globalization?
kvasek [131]
Learn a foreign language
4 0
2 years ago
Write a program that reads a file name from the keyboard. The file contains integers, each on a separate line. The first line of
Sindrei [870]

Answer:

Explanation:

import java.util.Scanner;

import java.io.*;

public class ArrayProcessing

{

public static void main(String[] args) throws IOException

{

Scanner kb = new Scanner(System.in);

String fileName;

System.out.print("Enter input filename: ");

fileName = kb.nextLine();

File file = new File(fileName);

if(!file.exists())

{

System.out.println("There is no input file called : " + fileName);

return;

}

int[] numbers = inputData(file);

printArray(numbers);

}

public static int[] inputData(File file) throws IOException

{

Scanner inputFile = new Scanner(file);

int index = 1;

int size = inputFile.nextInt();

int[] values = new int[size];

while(inputFile.hasNextInt() && index < values.length)

{

values[index] = inputFile.nextInt();

index++;

}

inputFile.close();

return values;

}

public static void printArray(int[] array)

{

int count = 1;

for (int ndx = 1; ndx < array.length; ndx++)

{

System.out.printf("%5.f\n", array[ndx]);

count++;

}

if(count == 10)

System.out.println("");

}

}

4 0
3 years ago
CODEHS 3.5.4 Obi-Wan Says
Likurg_2 [28]

The program receives inputs for the name, number of droids and wookiees a user wants and displays the information as a complete sentence. The program written in python 3 goes thus :

name = input('Enter name : ')

<em>#</em><em> </em><em>prompts</em><em> </em><em>user</em><em> </em><em>of</em><em> </em><em>name</em><em> </em>

num_droid = int(input('number of droids : '))

<em>#prompts</em><em> </em><em>for</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>droids</em><em> </em>

num_wooks = int(input('number of wookiees : '))

<em>#prompts</em><em> </em><em>for</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>wookiees</em><em> </em>

print(name, ' wants to meet', num_droid, 'droids and',num_wooks , 'Wookiees' )

<em>#displays</em><em> </em><em>the</em><em> </em><em>information</em><em> </em><em>as</em><em> </em><em>a</em><em> </em><em>complete</em><em> </em><em>sentence</em><em> </em>

<em>A</em><em> </em><em>sample</em><em> </em><em>run</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>program</em><em> </em><em>is</em><em> </em><em>attached</em><em> </em>

<em>Learn</em><em> </em><em>more</em><em> </em><em>:</em><em> </em><em>brainly.com/question/25506437</em>

5 0
2 years ago
Do you think that people accept poor quality in information technology projects and products in exchange for faster innovation?
ohaa [14]

Answer:

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

This depends on the company, but some companies will accept poor quality as long as the product works and provides them faster innovation. This will happen especially if a company knows or has an idea that a competitor is working on a similar product.

Another big reason why a company might accept poor quality in order to release a product is <u>money</u>. Sometimes a company does not have the budget to continue the project, therefore they release it usually in <u><em>Early Access</em></u>. This allows them to start making some money on the project while they continue to work on it.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Other questions:
  • 9. The best way to insert an existing Excel chart into a document is to A. use the Object command. B. click the Insert tab and c
    6·2 answers
  • Who's better Kapkan or Tachanka?
    6·1 answer
  • Explain the term remote backup with examples.​
    5·1 answer
  • All of the following are forms of verbal communication except
    12·2 answers
  • Write a complete Java method that returns an integer. The method declares a Scanner object, then prompts the user for a series o
    12·1 answer
  • Two machines can finish a job in StartFraction 20 Over 9 EndFraction hours. Working​ alone, one machine would take one hour long
    10·1 answer
  • ap csp The local, remote, and upstream _______ can each have multiple ___ _____. When a participant in a collaborative group on
    5·1 answer
  • .Write a MATLAB script that VECTORIZES (eliminates the loop) the following code. (4points)
    14·1 answer
  • Which tab automatically becomes available after inserting a text box? Drawing Tools Insert Text Box Tools Shape Tools
    15·2 answers
  • 10 points + brainliest to first correect answer :) incorrect answers/ answers with no effort will be deleted this is easy im jus
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!