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
zhuklara [117]
3 years ago
5

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

nt() { System.out.print(x); } } 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 correctly redefines the method print of DClass?
(i) public void print() { System.out.print(x + " " + y); }
(ii) public void print() { super.print(); System.out.print(" " + y); }
Computers and Technology
1 answer:
Feliz [49]3 years ago
4 0

Answer:

Option (ii) is the correct option to the following code.

Explanation:

In the following code of the Java Programming Language, there is two print function after the set function then, we firstly set the value of x and print it through print function which is already declared then, we set the value of y through set function then, print the value of y through print function. So, that's why the following option is correct.

You might be interested in
Create a function printInfo(some_dict) that given a dictionary whose values are all lists, prints the name of each key along wit
aleksandrvk [35]

Answer:

def printInfo(some_dict):

   print(len(some_dict['locations']), "LOCATIONS")

   for location in some_dict['locations']:

       print(location)

   print()

   print(len(some_dict['instructors']), "INSTRUCTORS")

   for location in some_dict['instructors']:

       print(location)

seattle = {

   'locations': ['San Jose', 'Seattle', 'Dallas', 'Chicago', 'Tulsa', 'DC', 'Burbank'],

   'instructors': ['Michael', 'Amy', 'Eduardo', 'Josh', 'Graham', 'Patrick', 'Minh', 'Devon']

}

printInfo(seattle)

Explanation:

7 0
3 years ago
An online company wants to conduct real-time sentiment analysis about its products from its social media channels using SQL.
iogann1982 [59]

Answer:

An online company wants to conduct real-time sentiment analysis about its products from its social media channels using SQL. The solution which has lowest cost and operational burden is as follow:

B. Configure the input stream using Amazon Kinesis Data Streams. Use Amazon Kinesis Data Analytics to write SQL queries against the stream.

Explanation:

  • The option A is not correct as this solution doesn't have lowest cost and operational burden as set up a streaming data ingestion application on Amazon EC2 and connect it to a Hadoop cluster for data processing will have more cost and operational burden.
  • The lowest cost and operational burden solution is that we configure input stream using Amazon Kinesis Data Streams. We can use Amazon Kinesis Data Analytics to write SQL queries against the stream.
  • The option c and d are also more pricey in terms of cost and operational burden as compared to Amazon Kinesis Data stream and analytics.  

4 0
3 years ago
How do most database users perform data searches?
defon

Answer:

by using forms

Explanation:

Most of the database users perform the data searches by using the forms. A form can be used to enter, edit and display the data from the data source. Its a user interface in fact that fetches the data from the database. Reports have used the display the data for a certain type of user, and the viewing table does not look feasible to search from a very large database, and the databases are usually large. No calculation is required for searching the data, and we only need to write queries in the right syntax. Hence, here the correct option is by using forms.

7 0
3 years ago
State and explain three importance of internet education​
Ne4ueva [31]

Answer:

It can improve the quality of education in many ways. It opens doorways to a wealth of information, knowledge and educational resources, increasing opportunities for learning in and beyond the classroom. Teachers use online materials to prepare lessons, and students to extend their range of learning

Explanation:

4 0
2 years ago
Read 2 more answers
Given a positive real number, print its fractional part.
givi [52]
<span>The modf() function will do this for you:

double x, y, d;
x = -14.876;
y = modf(x, &d);
printf("Fractional part = %lf\n", y);

</span>
8 0
3 years ago
Other questions:
  • Nancy would like to configure an automatic response for all emails received while she is out of the office tomorrow, during busi
    13·2 answers
  • What is a recent technological breakthrough with an impact that can be compared to the invention of paper nearly 2,000 years ago
    8·1 answer
  • Um can anyone who is really into science and physics answer this question
    7·1 answer
  • SATCOM in the Ku- and Ka- bands, as well as EHF systems are adversely affected by rain (the higher the frequency, the greater th
    14·1 answer
  • What are the main features cyber law of Nepal​
    13·1 answer
  • In French class, Blue puts on a visor and the environment changes to that of a café in Paris. Which of the following terms descr
    12·2 answers
  • 4. Write technical term for the following statements
    15·2 answers
  • If any one answered this i will give brilientst what is stimulation program​
    6·1 answer
  • A _______ is a group of elements that you want to style in a particular way.
    8·2 answers
  • what is one category of software mentioned in the unit materials as being example of groupware English technical
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!