Which of the following is true about Interface? Select one: O a. It is a special kind of block containing method signatures only O b. It is use to model multiple inheritance which allows a class to have more than one superclass. O c. It defines the signatures of a set of methods without the body O d. It defines a standard and public way of specifying the behavior of classes O e. All of these Clear my choice Which of the following is the correct way to use an interface? Select one: O a. None of these O b. public class Person apply [InterfaceName] {} O c. public class Person implements [InterfaceName] {} O d. public class Person extends [InterfaceName] {}
Q: What is the most efficient way to access data when you have multiple tables? a) Use the VLOOKUP…
A: Introduction: Here we are required to find which is the most the most efficient way to access data…
Q: technical approach in docker aiming project in Ubuntu in VM including images and container and…
A: Comparing Shipping Containers: Vessels and virtual servers both benefit from power separation and…
Q: What were some of the data security and privacy flaws that exposed the Veterans Administration (VA)…
A: Introduction: The Department of Veterans Affairs (VA) was one of the first government organizations…
Q: (Q1) Given the following grammar: -> = -> * | -> + | -> ( ) | -> X|Y| Z Show a parse…
A:
Q: Explain how Windows 10 handles processes.
A: Introduction: PMW (Process Manager for Windows) is an application that allows users to control their…
Q: ples repeat( "cow", 3 ) => "cowcowcow" repeat( "alf", 10 ) => "alfalfalfalfalfalfalfalfalfalf"…
A: 1. To print quotation mark you need to escape the character. ex. wanna print . He's good code…
Q: USING TKinter Please create a Python program based on the game of WAR. The rules of the game are as…
A: import random # all the suits and ranks suits = ["Spades", "Diamonds", "Hearts", "Clubs"] ranks =…
Q: In user interface design, what is the difference between an information system and a computer…
A: In user interface design, The difference between an information system and computer application are…
Q: What would be the output of the following code? KWLinkedList list = new KWLinkedList (); for(int i =…
A: KWLinkedList<Integer> list = new KWLinkedList<Integer>(); for(int i=0; i<4; i++)…
Q: Computer science Short answer What is an array such a useful tool?
A: Introduction: When several variables of the same type must be utilized, arrays are employed.
Q: To class Tree that represents binary search tree (BST), add the following method: 1- printByLevel ()…
A: Here's your code in java: import java.util.*; class Node { int key; Node left,…
Q: What will be the value of the variable A at the end of the loop? int A; for(A=9; A>= 3; A -= 2)…
A: Here we had declared the variable A . In the for loop we had initialized the value of the A as the…
Q: List the item ID, description, and category for each pair of items that are in the same category.…
A: ANSWER:-
Q: Using Document Object Model (DOM): Modify “src” attribute in the following HTML code, photo1.jpg to…
A: Answer: <script> document.querySelector("h1").innerText = "Hello KSA";
Q: Computer science What methods can be used to deal with massive data sets, which can be terabytes in…
A: Introduction: What methods can be used to deal with massive data sets, which can be terabytes in…
Q: The alphabet set of a discrete memoryless source (DMS) consists of six symbols A, B, C, D, E, and F…
A: Huffman coding:It is a lossless data compression algorithm.To design a tree start by taking a…
Q: Q1: Write a C++ program to compute the sum of the specified number of Prime numbers. For example,…
A: Ans: Code: #include <iostream>using namespace std; int main(){ const int MAX = 1000000;…
Q: The Barber gives you an A sequence of N's length. Let X mean MEX for A sequence. The cook is…
A: The program is written in Python. Check the program screenshot for the correct indentation. Please…
Q: MapReduce is a programming modelused in Hadoop for processing big data it's also a processing…
A: MapReduce is a distributed computer processing technology and program architecture based on Java.…
Q: The terms subnet, prefix, and BGP route should be defined and compared.
A: The Answer is in given below steps
Q: What is the main role of an ER diagram in data modelling? How many courses each student can have?…
A: What is the main role of an ER diagram in data modeling? An entity-relationship diagram, or ER…
Q: A string such as "AUM" is really an array of individual characters in C. Select one: O True O False
A: In C strings is not a datatype on its own.
Q: What is a firewall's primary function? What is the most effective approach to employ packet…
A: Introduction: When incoming and active business traffic is examined, a firewall determines whether…
Q: Homework 8.1 Using java fx programming draw the below picture
A: You are required in the below steps. Follow the screenshot to avoid an indentation error. You should…
Q: The levels of are used to categorise network protocols.
A: Introduction: The OSI layers are used to categorise network protocols.
Q: can I know the pseudocode and flowchart for this programm..thank you
A: In the question, we are asked to write a pseudo code and flow chart of the given code. Given Code:…
Q: Is it ever appropriate to use cyber assaults against an organisation or a group, and if so, why?
A: Cyberattack: A cyberattack is a…
Q: Please write python codes to smooth an image by using median filter and Bilateral filter separately.…
A: Here i am writing the code for both filter separately. You can use code and use any input image as…
Q: Design a pseudo code and Flowchart to solve the following Problem Total Sales (Arrays) Design a…
A: Declare a list to store input Iterate loop for 7 times and every time append the input to list…
Q: Describe enterprise storage systems, file servers, network attached storage, RAID systems,…
A: Introduction: Devices for Mass Storage: As the name implies, they are used to store a large amount…
Q: Four trigonometric identities are given by: a) Sin 4x = 4sin x cos x-8sin x cos x 1- tan?x b) Cos 2r…
A: Issue the following to verify at the command window. Calculate the LHS and RHS of the equation.…
Q: Write a C program that prints the following output: AND COMMENT EVERY STEP PLEASE 6 7 8…
A: 1. declare the variable i and j for iterartion i is used for inner loop and j is used for outer…
Q: In the right triangle shown a = 17 cm and c = 50 cm. Define a and c as variables, and then: a) Using…
A: Dear learner, hope you are doing well , I will try my best to answer this question. Thank You!!
Q: Part 1: Please answer the following questions about the fundamental of cryptography. Each question…
A: which description about information theoretic security is NOT correct?
Q: How can a computer application be made to operate quickly and effectively on a contemporary…
A: Introduction: The execution of instructions is separated into numerous stages in contemporary pipe…
Q: Show Static structures and external structures can be initialized. The member initializers must be…
A: The Answer is in given below steps
Q: ays struct a Java class that includes the static methods described in the tab hod Return Formal…
A: The Java program to solve the given problem is below.
Q: Which of these is a MAC Address? A. 9C-35-5B-5F-4C-D7-IC-00 B. 00:0C:29:IC:BC:6B C. 0912 491 1234…
A: Let us see the answer:-
Q: Python question. Why do you have to set the weight of sum, homework grade, quiz grade, tests grade…
A: In python the weight of sum, homework grade, quiz grade, tests grade equal to 0 when you calculate…
Q: output: standard output Given a number N and an array A of N numbers, print the maximum in the range…
A: Please upvote. I am providing you the correct answer below.
Q: What exactly does application partitioning entail?
A: Introduction: Application partitioning is a word used to describe the process of developing…
Q: In the context of CNN based Semantic Segmentation what is Transposed (“Deconvolution”) Convolution…
A: In the context of CNN based Semantic Segmentation what is Transposed (“Deconvolution”) Convolution…
Q: Computer science What is the menu's content? Explain how task-related menus are organised in…
A: Introduction: Menu Menus are useful for providing clues to the concept. It is nicely built around…
Q: It is beyond our scope to discuss how operating systems implement processes.
A: Introduction: It is beyond the scope of this document to determine how operating systems implement…
Q: task3.c Fizz Buzz problem printing out 1 2 Fizz 4 Buzz Fizz ... */ #include int main() {…
A: We need to write a C code for the given scenario.
Q: Computer scienceWhat kinds of tools and technologies are available to help with software testing?
A: Introduction: What kinds of tools and technologies are available to help with software testing? The…
Q: Explain why protocols such as SSL and SSH cannot be subjected to deep packet inspection.
A: Introduction: When it comes to network eavesdroppers, TLS (and SSL is just an older version of that;…
Q: Consider the following weighted digraph, then fill up its adjacency matrix and also draw its…
A: Given: Given the following weighted diagraph , then fill up its adjacency matrix and also draw…
Q: Check applicable statements that describes a typical network switch (L2 switch) and its usage:
A: Solution: Given, Check applicable statements that describes a typical network switch (L2 switch)…
Q: Computer science What is the definition of heuristic evaluation? What is the purpose of it?
A: Introduction: Heuristic assessment (Nielsen and Molich, 1990; Nielsen 1994) is a usability…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Say we have a collection of animal classes, with each class represents a kind of animal. They all share a common ability of “speak”. Dog speak in the way of “Woof! Woof!”, cats speak in the way of “Meow! Meow!”, etc. In order to capture this common characteristic, we need an interface named Speakable: public interface Speakable { // put the method header here } Think about what method is needed for the Speakable interface? (what method can describe the speakable feature? ) We simply need one method speak() to print out the way that the animal “speaks”. Put the method header in the interface body. This method does not take any parameter and does not return any value. Be reminded that you only need to put the method header with a semicolon (abstract method) into the interface. BE NOTED: Adding an interface is different from adding a class. You need to click File tab -> New -> Interface, to add an interface file to the project. Now download Dog.java. Have them implement the…14. Which statements are true about the following code? (Choose all that apply) 1: interface HasVocalCords {2: public abstract void makeSound();3: }4: public interface CanBark extends HasVocalCords {5: public void bark();6: } A. The CanBark interface doesn’t compile.B. A class that implements HasVocalCords must override the makeSound() method.C. A class that implements CanBark inherits both the makeSound() and bark() methods.D. A class that implements CanBark only inherits the bark() method.E. An interface cannot extend another interface. Can you explain this code as well as the methods such as interface abstract etc. used in it.14. Which statements are true about the following code? (Choose all that apply) 1: interface HasVocalCords {2: public abstract void makeSound();3: }4: public interface CanBark extends HasVocalCords {5: public void bark();6: } A. The CanBark interface doesn’t compile.B. A class that implements HasVocalCords must override the makeSound() method.C. A class that implements CanBark inherits both the makeSound() and bark() methods.D. A class that implements CanBark only inherits the bark() method.E. An interface cannot extend another interface. Please explain this code abstract, extent and interface methods too in detail.
- Q# Which of the following might have only method signatures? Group of answer choices 1. An interface 2. An abstract class and a concrete class 3. An abstract class 4. An interface and an abstract class 5. None of these, they all require the implementation. 6. A concrete classWhich of the following cases is most like the adapter pattern? A. If you have an interface called Duck, and have many ducks that implement the duck interface. All of these ducks must have the behaviour “quack” but for some ducks, like a Mallard, this must result in a quack, where for a rubber duck it must result in a squeak. We decide to delegate the quack method to another interface, which can be implemented either in a concrete class that returns a quack or a concrete class that returns a squeak. B. None of these are like the adapter pattern. C. We have a large collection of Ducks. We want to look at them one by one and hear them quack. We write a piece of code that iterates through them all, and as we encounter each one, we have it invoke the quack method. D. If we have an interface called Duck. We need to give an object to a user that can quack like a duck. All we have is Turkeys. We create a special class that implements the duck interface, and to implement the quack…What is true about private fields of a class? They must be used with private methods. They are accessible from anywhere inside or outside of a class. They can never be used in a class. They can be accessed only by methods inside the class they are associated with. Which of these keywords is used to refer to a member of a base class from a subclass? power super this upper Which of the following is true about abstract classes? Note that if a class can be sub-classed, this simply means that it can be derived from. Abstract classes can only contain abstract methods. They cannot be sub-classed. Abstract classes cannot be instantiated, but they can be sub-classed. Abstract classes can only contain abstract methods. They can be sub-classed. Abstract classes can be instantiated, but they cannot be sub-classed.
- Suppose that MyInterface is a Java interface you have written. Which of the following is true about MyInterface and the Comparable interface?? a) If I want to use the methods in MyInterface in a class called MyClass, I must code "implements MyInterface " on the signature line of MyClass b) In the code for MyClass, I must implement (provide code for) all of the methods of MyInterface c) The Comparable interface has only one method - the compareTo method. d) The above statement are all true.Solve this in java oop. In order to handle the “Carbon Footprint”, your job is to create an interface called CarbonFootPrintProducer that shall contain a method declaration called getCarbonFootPrint(), that shall return a double value indicating the amount of CO2 generated by an instance of the implementing class. Your next job is to create two classes i.e. House and Car, both shall implement CarbonFootPrintProducer interface. House must have an attribute coveredArea, while Car must have an attribute milesDriven, both public. Create fully parametrized constructor in each subclass. Both subclasses must contain their own getCarbonFootPrint() implementation that shall calculate the CO2. For the calculation of CO2, use the following formulas. CO2 produced by House = coveredArea * 0.005 CO2 produced by a Car = milesDriven * 0.0000292 Create a class CarbonFootPrintTest. Define static method calculateTotalFootPrint(ArrayList entities) method that shall calculate and return total CO2 of…Which (if any) of the following conditions are necessary for using polymorphism? Select all correct answers. The classes involved are in the same hierarchy. None of the classes can be abstract. All of the subclasses involved override the same method. The object reference cannot be of an interface type. An object reference of the superclass is used to call any methods. A superclass object is referenced by a subclass reference. Which of the following (if any) are true of abstract methods? Select all correct answers. Abstract methods must have a method body. Abstract methods cannot be declared in a class that isn't abstract itself. Abstract methods cannot be private or static. Abstract methods can only be declared in an interface. Abstract methods cannot be called. Constructor methods can be abstract.
- Which (if any) of the following conditions are necessary for using polymorphism? Select all correct answers. The classes involved are in the same hierarchy. None of the classes can be abstract. All of the subclasses involved override the same method. The object reference cannot be of an interface type. An object reference of the superclass is used to call any methods. A superclass object is referenced by a subclass reference. Which of the following (if any) are true of abstract methods? Select all correct answers. Abstract methods must have a method body. Abstract methods cannot be declared in a class that isn't abstract itself. Abstract methods cannot be private or static. Abstract methods can only be declared in an interface. Abstract methods cannot be called.Create a base class with an abstract print( ) method that isoverridden in a derived class. The overridden version of themethod prints the value of an int variable defined in the derivedclass. At the point of definition of this variable, give it a nonzerovalue. In the base-class constructor, call this method. In main( ),create an object of the derived type, and then call its print( )method. Explain the results. (JAVA) Also provide clear output screenshots pleaseWhich of the following cases is most like the strategy pattern? A. If you have an interface called Duck, and have many ducks that implement the duck interface. All of these ducks must have the behaviour “quack” but for some ducks, like a Mallard, this must result in a quack, where for a rubber duck it must result in a squeak. We decide to delegate the quack method to another interface, which can be implemented either in a concrete class that returns a quack or a concrete class that returns a squeak. B. If we have an interface called Duck. We need to give an object to a user that can quack like a duck. All we have is Turkeys. We create a special class that implements the duck interface, and to implement the quack method we simply call the turkey’s gobble method. C. None of these are like the strategy pattern. D. We have a large collection of Ducks. We want to look at them one by one and hear them quack. We write a piece of code that iterates through them all, and as we encounter…