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
12

Suppose Animal is an interface that specifies a single method – speak. Now suppose the Dog class implements the Animal interface

. In addition to the speak method, the Dog class also has a method called wagTail. Now consider the following code.
Animal a = new Dog();
a.wagTail();
Which of the following is true about this code?
a) It will result in a compile-time error.
b) It will result in a run-time error.
c) It will call the speak method defined in the Animal interface.
d) It will call the wagTail method defined in the Dog class.
e) none of the above are true.
Computers and Technology
1 answer:
Finger [1]3 years ago
7 0

Answer / Explanation

To properly answer this question, let us define some basic terms within the narrative of the question.

This includes:

Speak Method: This is a type of java script or programming language syntax or method. The speak method usually denoted by the symbol () is a form of of Speech combination or the combination of components of different speech or elements to form a whole speech method. it is an interface that  adds an utterance to the utterance queue and  it will be spoken when any other utterances queued before it have been spoken.

Now, referencing the definition of speak method above and relating to the the options given as an output in the codes written in the answer options,

The answer here is (a) that is it will fail to comply which is equivalent to the option of it resulting to a compile time error.

You might be interested in
Help with this please anyone
Vsevolod [243]

Answer:

       trojan horse

         worm

         virus

        spyware

Explanation:

gimme the brainliest hehe

3 0
3 years ago
Read 2 more answers
The software concept ___________and defines a need for the new system.
lubasha [3.4K]

Answer:

application

hope it helps you

3 0
2 years ago
A home user reports to a network technician that the Internet is slow. The network administrator discovers that multiple unknown
BabaBlast [244]

Answer:

Option (A) A successful WPS attack has occurred

Explanation:

  • WPS stands for Wi-Fi Protected Setup.
  • Its a network security protocol in the Wi-Fi which has a vulnerability.
  • The connection to the Wi-Fi can be established through the router in four ways. They are
  • (a) PIN method
  • (b) Push button method
  • (c) Near field communication method
  • (d) USB Method.
  • Out of all the modes to be connected to the network, the PIN method has a flaw in it.
  • In this PIN method, an attacker can brute force the PIN (guessing the PIN by some techniques) and gain unauthorized access to the network.
  • In the given case in the question, the network administrator finds that multiple unauthorized devices has gained access to the network.
  • Option (A) is correct.
  • Option (B) ARP Poisoning, (C) botnet and (D) Evil Twin attack are different and so are the wrong options.  
3 0
3 years ago
Read 2 more answers
1. Create an array of ints with 20 elements. With a random number generator, seeded with time, assign a random number between 1
nikdorinn [45]

Answer:

#include <iostream>

#include<time.h>

using namespace std;

void sort(int a[20],int n)   //selection sort

{

   int i,j,temp;

   for(i=0;i<n;i++)        

   {

       for(j=i+1;j<n;j++)  //finds minimum element

       {

           if(a[i]>a[j])     //swaps minimum element to its right place

           {

               temp=a[i];

               a[i]=a[j];

               a[j]=temp;

           }

       }

   }

}

int main()

{

   srand(time(NULL));

   int arr[20],n=20,i;

   for(i=0;i<n;i++)

       arr[i]=rand() % 100 + 1;    //assigns random number to each array element

   cout<<"Before sorting\n";

   for(i=0;i<n;i++)

       cout<<arr[i]<<" ";   //prints array before calling sort func

   sort(arr,20);     //sort the passed array

   cout<<"\nAfter sorting\n";

   for(i=0;i<n;i++)

       cout<<arr[i]<<" ";  //prints array after sorting

   return 0;

}

OUTPUT :

Please find the attachment below.

Explanation:

The program above first assigns random number from 1 to 100 to each element of array using rand(). srand(time(NULL)) is used to generate new number every time otherwise same random number will be produced at a time. Then sorting method is called in which selection sort algorithm is used.

Selection sort algorithm finds the minimum element in each pass and place it into its right position. For example - 34,54,12,5 is passed

After Pass 1 - 5  54  12  34

After Pass 2 - 5  12  54  34

After Pass 3 -  5  12  34  54

5 0
3 years ago
What is the different between the patch Tool and the Headling Brush tool?​
KonstantinChe [14]

Answer:

Explanation:

The Healing Brush and Patch tools add extra features. They match the texture, transparency, lighting, and shading of the sampled area. Instead of replacing them, pixel for pixel, like the clone stamp. This causes the painted pixels to blend seamlessly into the rest of the image. Using the Healing Brush tool: 1. Select the Healing Brush tool in the toolbox.

7 0
2 years ago
Other questions:
  • Net Worth is equal to assets minus liabilities. Which event will have the greatest impact (positive or negative) on one's net wo
    5·1 answer
  • What describes the basic transaction data such as its date, purpose, and amount and includes cash receipts, canceled checks, inv
    13·1 answer
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • Number 20, can anyone help?
    11·1 answer
  • Fatal error: Class 'Drush\Commands\DrushCommands' not found in /Users/amy/testsite/Sites/acquia dev desktop/fresh-install/module
    7·1 answer
  • Explain the difference between the legal protections a security officer enjoys and the legal protections a police officer receiv
    12·2 answers
  • 9.1.3: Printing vector elements with a for loop. Write a for loop to print all NUM_VALS elements of vector courseGrades, followi
    5·1 answer
  • Write a calculator program using a switch statement that: a) Prompts the user to enter two numbers b) Prompts the user to select
    6·1 answer
  • Most effective way of closing email is<br>​
    7·2 answers
  • You can easily merge files even if each file contains a different record layout. Group of answer choices True False
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!