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
Readme [11.4K]
3 years ago
8

Which of the following are incorrect? Group of answer choices An interface can contain constructors. You may declare a final abs

tract class. The constructors in an abstract class should be private. An abstract class can contain constructors.
Computers and Technology
2 answers:
spin [16.1K]3 years ago
6 0

Answer:

Explanation:

1. The answer is No, interface cannot have constructors. ... In order to call any method we need an object since there is no need to have object of interface, there is no need of having constructor in interface (Constructor is being called during creation of object).

2.A final class is considered complete and can not be subclassed (It's methods can not be overridden ). In case of abstract class, we have to proved implementation to abstract methods in subclasses. A final class can not have abstract methods and an abstract class can not be declared final.

3.private constructors are acceptable, however the class should be marked final instead, as doing so means the class is to be extended.

4.Yes! Abstract classes can have constructors! Yes, when we define a class to be an Abstract Class it cannot be instantiated(i.e an object cannot be created) but that does not mean an Abstract class cannot have a constructor. Each abstract class must have a concrete subclass which will implement the abstract methods of that abstract class.

SCORPION-xisa [38]3 years ago
4 0

<u>Answer:</u>

<u></u>

Incorrect options are;

i. An interface can contain constructors

iii. The constructors in an abstract class should be private.

<u>Explanation:</u>

<em>Option i is incorrect</em>. An interface cannot be instantiated (object cannot be created from it) or extended (classes cannot inherit from it) and as such no constructors are needed.

<em>Option ii is correct</em>. You may declare a final abstract class. This would just mean the class cannot be instantiated and neither can it be extended. That would also mean a redundant class.

<em>Option iii is incorrect</em><em>. </em>A constructor in an abstract class should not be made private (although possible). Otherwise, not only will it not be instantiable, it will also not be extensible.

<em>Option iv is correct</em>. An abstract class can contain constructors. Since abstract classes can be extended, having constructors in them will allow classes, that inherit from them, to be able to create objects from them.

You might be interested in
What is wrong with each of the following?
ankoles [38]

Answer:

The answer to this question is given below in the explanation section

Explanation:

shoNum + shoNum2 = shoTotal

in this code statement,  the order of operation is wrong because the calculation in programming always done at the right side of dependent variables.  so the correct statement of code is

<em> shoTotal = shoNum + shoNum2;</em>

shoNum = 10 * 4

This statement is programmatically correct, because the ShoNum value becomes 40 after performing the multiplication operation on its assigned value  (10 multiply by 4). However, it is noted that the empty space mostly ignored by the compiler. So, the correct is <em>shoNum = 10*4;</em>

Dim decPrice As Decimal = "$4.99"

The dollar sign is appeared in along with its value. So, if you assign value to a decimal variable, you need to assign only digit value (do not mix value with symbol or text) and also do not put quotation marks around value, if you put quotation marks around value then this value will be consider as a text value.

So, the correct statement is :

<em>Dim decPrice As Decimal = 4.99;</em>

shoCube= (shoSide)3

In this statement, cube is calculated of shoSide variable, mathematically it is right, but programmatically it is incorrect. Because, you missed the multiplication operation (*) between the operand shoSide and 3. it should

be as  shoSide raise to power 3.

the correct statement is : shoCube = (shoSide * shoSide *shoSide);

4 0
3 years ago
………………….. is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of
frutty [35]
Control <span>is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of the above</span>
4 0
3 years ago
Nila has created a report, and now she would like to a create table of contents. Nila has reviewed her report and decides to add
Alenkinab [10]

Answer:

The answer is "heading"

Explanation:

Headings, which appear into your document must be marked simply, objectively and correctly because it shows the final report structure and enable to easy access with specific information.  

  • It also promotes to read the document. So, its consistency is ensured in the headings.
  • In sort documents, it can't require any heading, but it Nila created a report, in which she requires  heading and then she update the content of the tables, and other choices can't be described in the given scenario, that's why it is correct
5 0
3 years ago
What makes an active heat sink different from a passive heat sink?
zimovet [89]
An active heat sync will keep a computer cool and basically cool the CPU and processors. A passive heat sink will only cool the CPU and whatever else it needs to cool when the CPU actually NEEDS to be cooled. I am not sure if this is all correct but I know about basic heat syncs and from my understanding this is right.
8 0
3 years ago
Travis sends Suri what purports to be a link to an e-birthday card, but when she clicks on the link, software is downloaded to h
12345 [234]

Answer:

Identity Theft

Explanation:

Identity theft is the act of someone who obtains details about someone else illegally.  This is done to find personal and financial information such  name, address,social security number, passwords, and credit card number, phone number, e-mail, etc. Then the hacker can use this information to control bank accounts, e-mails, computers, portray himself as you are, or sell information to someone else.

3 0
3 years ago
Other questions:
  • I need the code for Assignment 5 Animation in Edhesive, its in python code.
    9·1 answer
  • In the space below, write the formula that needs to be added to the blank cells under the fourth column of the table.
    13·1 answer
  • MICR is an input or output devices
    5·1 answer
  • American company Software Unlimited is planning to expand its operations to the Bangor Republic where the group is the primary u
    7·1 answer
  • I NEED HELP ASAP!
    6·2 answers
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • Resize vector countDown to have newSize elements. Populate the vector with integers {newSize, newSize - 1, ..., 1}. Ex: If newSi
    6·1 answer
  • If a switch needs to send information to other switches in the network it would send out a ___________.
    7·2 answers
  • In order to preview an attachment in an e-mail, click the attachment in the ______
    8·1 answer
  • a 2x4 line decoder with enable is implemented using nand gate only. how many nand gate is needed to construct this line decoder?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!