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
olasank [31]
3 years ago
11

Consider the following class definitions. public class BClass { private int x; public void set(int a) { x = a; } public void pri

nt(){ } } public class DClass extends BClass { private int y; public void set(int a, int b) { //Postcondition: x = a; y = b; } public void print(){ } } Which of the following is the correct definition of the method set of the class DClass? (i) public void set(int a, int b) { super.set(a); y = b; } (ii) public void set(int a, int b) { x = a; y = b; }
Computers and Technology
1 answer:
Stella [2.4K]3 years ago
7 0

Answer:

The answer to the given question is the option "(i)".

Explanation:

In this question, the correct option is the "(i)" because In this method definition we use the super keyword. It refers to the parent's class. In this method, we use the superclass to call the above (parent) class method. and if we choose the option (ii), It will not call the parent class. That's why we use the option (i) which is correct.

You might be interested in
What doyou mean by process model and project model?
vlabodo [156]

Answer:

A process model is a narrative of each type of process. These models consist of processes that are inherently similar and are categorized accordingly; a logical set of actions executed in a comprehensible framework.

A project model is concise and visual, it depicts how a project will be implemented. They are specifically tailored according to each project, describing each of its functional aspects. Decision gates and partitions are important aspects and need to be exemplified throughout the project.

4 0
2 years ago
______ behavior expected from every professional​
Shalnov [3]

Answer:

Respectful

Explanation:

3 0
2 years ago
The following method is intended to remove all values from the ArrayList a that have the same value as val; however, this method
Alona [7]

Answer:

ArrayList a contains [2, 3, 3, 3, 4, 5, 3, 2, 1]

Explanation:

Given

The removeValue method

Required

The content of ArrayList a, after the method is called

From the question, we understand that arraylist a is:

a= [2, 3, 4, 3, 3, 4, 4, 5, 4, 3, 2, 1]

val =4

The function fails when the value to be removed appear consecutively in the list.

4 appears in index 5 and 6 of the list. Only one of the 4's will be removed

So, the updated list will be: [2, 3, 3, 3, 4, 5, 3, 2, 1]

6 0
2 years ago
__________ has remained a dominant communication tool, despite the rise in use of newer, alternative media options for message d
maksim [4K]

Answer: E-mails

Explanation:

 An E-mails is one of the type of digital message and also known as the dominant communication tool which is used for in the form of document in an organization where we can used it in different ways are as follows:

  • Communicating with other employees related to rules and regulations of an organization
  • Making various types of recommendations
  • Used for an inquiry purpose
  • providing various types of current status and new updates

According to the given question, Emails is one of the type of tool that is used as the communication medium and it is one of the flexible message delivery options which is widely used by an organizations.

 

6 0
2 years ago
The​ ________ is a​ c-shaped structure that curves around the pancreas and stomach
Sever21 [200]
The duodenum is the c-shaped structure that curves around the pancreas and stomach , it is actually the smallest part of the small intestine and joins the stomach to the jejunum <span />
6 0
2 years ago
Other questions:
  • 1.) How do parks and other green spaces benefit a community?
    10·1 answer
  • Which option organizes tasks based on importance?
    12·1 answer
  • When saving a memo you created in Word, which one of the following extensions is automatically assigned to the document?
    13·1 answer
  • What is the ribbon in the word document
    5·1 answer
  • Which windows tools would you use to browse the files system on a hard drive?
    6·2 answers
  • Sonic the Hedgehog (1991)
    14·1 answer
  • 2. Which of the following statements accurately describes enzymes? A. Enzymes increase the activation energy of reactions. B. Te
    5·1 answer
  • Which line in the following program will cause a compiler error? #include using namespace std; int main() { int number =5; if (n
    10·1 answer
  • Cynthia realized that she used a wrong term throughout her paper. Which option can help her quickly correct her mistake?
    5·1 answer
  • The users in your organization bring their own mobile devices to the office and want to be able to access the network with them.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!