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
Which line in the following program will cause a compiler error? #include using namespace std; int main() { int number =5; if (n
DanielleElmas [232]

Answer:

  1. #include  <iostream>
  2. using namespace std;
  3. int main() {
  4. int number =5;
  5. if (number>=0&& number <=100){
  6.    cout<<"passed.\n";
  7. }
  8. else{
  9.    cout<<"failed.\n";
  10. }
  11. return 0;
  12. }

Explanation:

There where multiple errors in the code given in the questions

Line 1: Missing <iostream>

Line 5: The comparison operator was wrong correction is highlighted

Line 12 Missing closing brace for the main function

All the errors have been fixed and the code above compiles

4 0
2 years ago
each term to the appropriate definition. DBMS data mining hash file index key field locking protocol relation roll back schema S
ikadub [295]

Answer:

1. DBMS

C. <em>A storage system that provides efficient access to randomly chosen items</em>

G. <em>Performs database operations requested by application software</em>

2. data mining

B. <em>The process of extracting hidden information</em>

3. hash file

A. <em>A. means of locating a particular record within a file</em>

4. index key field

F. <em>An item used to identify records uniquely</em>

5. locking protocol

E. <em>A system to guard against database errors due to performing transactions concurrently</em>

6. relation

D. <em>A structural unit (with rows and columns) in a popular database model</em>

7. roll back schema

I. <em>A "road map" of a particular database's design</em>

J. <em>To "unwind" a transaction</em>

8. SQL

H. <em>A popular language that implements relational database operations.</em>

5 0
2 years ago
Suppose we want an error correcting code that will allow all single-bit errors to be corrected for memory words of length 15. 1.
alexira [117]

Answer:

15

Explanation:

01234567891011121314

5 0
2 years ago
Which browser folder contains previously viewed web pages?
Arlecino [84]
<span>The history browser folder contains previously viewed web pages. This folder </span>stores the URLs of sites you have accessed within a defined period of time, which means you can see your browsing history.
<span> You can choose how you want to view the history by selecting a filter from the menu on the history tab.</span>
6 0
2 years ago
Why is haptic feedback important?
ExtremeBDS [4]

\huge\underline{\red{A}\green{n}\blue{s}\purple{w}\pink{e}\orange{r} →}

Haptic feedback is used to engage more of the user's senses to provide a deeper and more immersive experience. Products that offer haptic feedback, such as some game controllers, often provide different kinds of sensations to correspond with different visual and audio stimuli.

Explanation:

<h3>Hope it helps you !!</h3>
7 0
1 year ago
Other questions:
  • Which of the following is a full selector?
    12·1 answer
  • What category of predefined formulas in Excel contains the Boolean functions?
    14·1 answer
  • What are some objects in your home that demonstrate electrical energy to radiant energy to thermal energy
    10·2 answers
  • Create a program to calculate the wage. Assume people are paid double time for hours over 60 a week. Therefore they get paid for
    10·1 answer
  • Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less
    6·2 answers
  • A model is replica that?
    11·2 answers
  • Who is gossip girl.....
    8·2 answers
  • The blue section of the following Venn diagram could represent which of the following Boolean statements?
    14·1 answer
  • There is a feature that allows you to lock the document, to avoid others making changes. True or False
    6·1 answer
  • Explain the pros and cons of touchscreen, non-touchscreen, and hybrid devices:
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!