What is the issue with this code

interface Box2{

static final int ITEM_CODE=201;

int method1();

double method2();
}

public class Window implements Box2{

public int method1(){

return ITEM_CODE;

}

}

public class myFrame{

public static void main(String args[]){

Window w = new Window();

System.out.println(w.method1());

}

}

A.
The interface should be declared as abstract.
B.
The class should be declared as abstract.
C.
The interface should have an implementation of method2.
D.
The class should have an implementation of method2.

Answers

Answer 1

Question: What is the issue with this code

interface Box2{

static final int ITEM_CODE=201;

int method1();

double method2();

public class Window implements Box2{

public int method1(){

return ITEM_CODE;

public class myFrame{

public static void main(String args[]){

Window w = new Window();

System.out.println(w.method1());

A. The interface should be declared as abstract.

B. The class should be declared as abstract.

C. The interface should have an implementation of method2.

D. The class should have an implementation of method2.

Answer: A The interface should be declared as abstract.


Related Questions

Fill in the blank to give the result of each operation.
2 * 5 =

4 ** 3 =

7 / 2 =

17 % 3 =

Answers

Answer:

2 * 5 =10

4 ** 3 =64

7 / 2 =3.5

17 % 3 =2

Explanation:

I just got them all correct :) good luck

The result from each operation from each operation of the mathematical calculations are 10, 64, 3.5, and 0.51.

What is the mathematical calculations?

Counting, calculating, and grouping objects in simple math information and commercial activities were among the mathematical calculations. Simple math facts and operations can be counted and computed using this formula.

The correct fill in the blanks are:

2 × 5 = 104 ** 3 = 64 (Cube of 4)7 / 2 = 3.517 % 3 =0.51

Therefore, the mathematical calculations made the calculations easier, and it is a time saver.

Learn more about the mathematical calculations, refer to:

https://brainly.com/question/11790473

#SPJ2

Fred is interested in creating marketing materials for video games. Which of the following occupations should he pursue?


texture artist

video game designer

graphic artist

video game artist

Answers

Answer:

The answer above is wrong well at least for odyssey ware!!

Explanation:

I think D

Select the correct answer.
In what decade did the first computer become commercially available?
A.
1950s
B.
1960s
1970s
thing
D.
1980s
O E.
1990s

Answers

Answer:

1960's

Explanation:

Answer: 1960

Explanation:

8. It is a computer component that converts AC power to DC power to be used
by the computer system.

Answers

Answer:

power supply unit.

A power supply unit (PSU) converts mains AC to low-voltage regulated DC power for the internal components of a computer. Modern personal computers universally use switched-mode power supplies.

Explanation:

I HOPE THIS HELPS

PLZ MARK ME AS BRAINLIEST

THANK U!

Given integer values for red, green, and blue, subtract the gray from each value.

Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus

(255, 0, 0) is bright red, (130, 0, 130) is a medium purple,(0,0,0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50,

130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray).

Given values for red, green, and blue, remove the gray part.

Answers

Answer:

Here is the C++ program:

#include <iostream>   //to use input output functions

using namespace std;   //to identify objects cin cout

int main() {   //start of main method

int red,green,blue,smallest;   //declare variables to store integer values of red,green, blue and to store the smallest value

cout<<"Enter value for red: ";  //prompts user to enter value for red

cin>>red;  //reads value for red from user

cout<<"Enter value for green: ";  //prompts user to enter value for green

cin>>green;  //reads value for green from user

cout<<"Enter value for blue: "; //prompts user to enter value for blue

cin>>blue;   //reads value for blue from user

//computes the smallest value

if(red<green && red<blue) //if red value is less than green and blue values

smallest=red;   //red is the smallest so assign value of red to smallest

else if(green<blue)   //if green value is less than blue value

smallest=green;   //green is the smallest so assign value of green to smallest

else  //this means blue is the smallest

smallest=blue;  //assign value of blue to smallest

//removes gray part by subtracting smallest from rgb

red=red-smallest;  //subtract smallest from red

green=green-smallest;  //subtract smallest from green

blue=blue-smallest;  //subtract smallest from blue

cout<<"red after removing gray part: "<<red<<endl;  //displays amount of red after removing gray

cout<<"green after removing gray part: "<<green<<endl;  //displays amount of green after removing gray

cout<<"blue after removing gray part: "<<blue<<endl;  } //displays amount of blue after removing gray

Explanation:

I will explain the program using an example.

Lets say user enter 130 as value for red, 50 for green and 130 for blue. Sp

red = 130

green = 50

blue = 130

First if condition if(red<green && red<blue)   checks if value of red is less than green and blue. Since red=130 so this condition evaluate to false and the program moves to the else if part else if(green<blue)  which checks if green is less than blue. This condition evaluates to true as green=50 and blue = 130 so green is less than blue. Hence the body of this else if executes which has the statement: smallest=green;  so the smallest it set to green value.

smallest = 50

Now the statement: red=red-smallest;  becomes:

red = 130 - 50

red = 80

the statement:  green=green-smallest;  becomes:

green = 50 - 50

green = 0

the statement: blue=blue-smallest; becomes:

blue = 130 - 50

blue = 80

So the output of the entire program is:

red after removing gray part: 80                                                                                                 green after removing gray part: 0                                                                                                blue after removing gray part: 80

The screenshot of the program along with its output is attached.

does anyone have a pdf of the greatest by eddie van der meer????

Answers

Answer

aight' so im finding it but i have to asnwer before someone else so look in the comments for it.

Explanation:

Just wait i getting it rn

5
Select the correct answer.
Which method is used to transfer information from one computer to another?
O A.
mass communication
B.
point-to-point communication
C.
internet protocol
D.
hard disk
E.
microprocessor

Answers

Answer:

A

Explanation:

If you wanted to mass communication means it imparts and exchanges information on a scale of people so you couple transfer and share your data from one person to another.

Answer: A

Explanation:

the way information from my computer is given back to the user is called​

Answers

Answer:

Add answer???

Explanation:

Which graphic file format would you choose if you needed to make an animated graphic for a website?

ai

png

gif

py
please help

Answers

Answer:

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

Explanation:

The correct option for this question is gif.

Gif is a series of images that are used as animated graphics for a website. A gif is the file format of an animated image. You may have seen many animated images on websites like stickers etc.

other options are not correct because:

ai: is adobe illustrator file format

png: png is an image file format but not for an animated image

py: py is a file extension of the python file.

Answer:

gif

Explanation:

The collection of tools and features at the top of the screen is called the
O file
O ribbon
O tab

Answers

TAB THE ANSWER IS TAB

Why does a bus topology require a terminator

Answers

Answer:The purpose of the terminator is to absorb signals so that they do not reflect back down the line

Explanation:

The answer is-

B.) because otherwise the packets will bounce back and forth from end to end repeatedly

Bus topology can be regarded as a kind of topology for a Local Area Network, it is one that has it's nodes connected to a single cable(backbone) and any break in the so called backbone, there will be failure in the entire segment. However a Terminator is usually attached to the end-points of a bus network so that the signal is absorbed by the Terminator and as a result of this the signal will not reflect back down the line. If there is no Terminator there would be bouncing back and forth of packet in an endless loop.It should be noted that a bus topology require a terminator because otherwise the packets will bounce back and forth from end to end repeatedly

What is the dependent variable, After learning about electricity, a student wants to see if electricity flows better through different materials. Our wonderful student has different materials: copper wire, aluminum wire, carbon fiber, and gold wire. The student attaches a small lightbulb to a 9 volt battery, and uses each wire to see how bright the lightbulb lights up when connected to each material.

Answers

Answer:

The Lightbulb is the dependent variable.

Explanation:

The dependent variable is defined as the variable that the researcher is measuring or testing and it observes the direct effect/change brought by manipulation in the independent variable. In the given experiment, the lightbulb would be characterized as the dependent variable as it is being tested by the researcher. He controls the independent variable(by using different wires) to observe its direct impact on the way the lightbulb lits. Thus, it(lightbulb) is the dependent variable.

Give me 2 examples of Monthly Cash Inflow: (2 points) *

Answers

Answer:

cash payments for goods and services; merchandise; wages; interest; taxes; supplies and others.

Explanation:

Answer:

1. Key cash flow drivers should be modeled explicitly.

In our example, a retail store business should start with the number of stores it plans to operate each month, then build up from there, based on the number of square feet and sales per square foot.  This will help the business to compute its revenue.

2. Inputs should only need to be input once.

It is important to group all inputs in the assumptions section so users can easily find, add, and modify them.

Explanation:

n what sense is it now possible for a country to be ""occupied"" by an invisible invader that arrives through airwaves and wireless networks? A. It is almost impossible to block foreign countries’ satellite broadcasts and Internet transmissions. B. Spy satellites and other communications technology are increasingly advanced. C. Global positioning systems have allowed detailed mapping of previously inaccessible places. D. The U.S. government can eavesdrop on almost any form of modern communication.

Answers

Answer:

Option A. is correct

Explanation:

It now not possible for a country to be "occupied" by an invisible invader that arrives through airwaves and wireless networks. It is almost impossible to block foreign countries’ satellite broadcasts and Internet transmissions inspite of Spy satellites and other communications technology and Global positioning systems.

Option A. is correct

Which of the following is NOT a characteristic developed by New Journalism?
illustrations and photographs
flashy page layouts
satirical news stories
banner headlines

Answers

Flashy page layouts

The one that is not a characteristic developed by New Journalism is flashy page layouts. The correct option is b.

What are flashy page layouts?

The flashy page Layout describes how the document pages will appear after printing. When we check the layout in Word, we can see that the page layout includes components such as margins, column count, and the ability to alter the header and footer.

There are various sorts of layouts, such as magazine layouts, static, adaptable, dynamic, adaptive layouts, and responsive layouts.

The features are as follows:

Page margin dimensions.Image and figure size and placementColumn and gutter count and size (gaps between columns)Intentional white space placement

Therefore, the correct option is b, flashy page layouts.

To learn more about flashy page layouts, refer to the link:

https://brainly.com/question/28702177

#SPJ2

Y’all know any movie sites I can go on?

Answers

Answer:

Tinseltown

Explanation:

what type of things can be marketed

Answers

Answer:

Physical goods that can be manufactured, or produced are the major items among those can be marketed. Examples include refrigerators, computers, music systems, food products, etc. Such physical goods constitute the bulk of production and marketing efforts. And here are the types of marketing Traditional Marketing. Traditional marketing refers to brand promotion on any kind of channel that has been around since before the advent of the internet.

A company hires Brandon, a software engineer. Brandon is asked to work on a project with others in order to meet a tight deadline. He finds himself in weekly meetings to discuss the direction and status of the project, but most of his time is spent creating code. What is Brandon's specialization?

system management
system support
system collaboration
system development

Answers

Answer:

System developement

Explanation:

he is creating code, which is devloping the system.

how can parents be health educators in family​

Answers

Answer:

They can be health educators in family because they are your parents.

Explanation:

The reason why is because since they are your parents that means they have kids, so they probably know the ins and outs of parenting and running a family.

Write a program that will add up the series of numbers: 99,98, 97...3.2.1. The program should print the running total as well as the total at the end.
The program should use one for loop, the range() function and one print() command.
Sample Run
99
197
294
390
-
4940
4944
4947
4949
4950

Answers

Answer:

result = 0

for i in range(99, 0, -1):

   result += i

   print(result)

Explanation:

It gives back a series of numbers that begin at zero, increase by one by default, and end just before the specified number. There are three criteria total, and two of them are optional.

What range() function and one print() command?

For the range() method to produce the integers in reverse order, use a negative step value. For instance, the expression range(5, -,1, -1) will result in the integers 5, 4, 3, 2, and 1.

By setting the step argument of a range() function to -1, you may effectively reverse a loop. Reverse iteration of the for loop's iterations will result.

The range() function returns a series of numbers that, by default, starts at 0 and increments by 1 before stopping in a given number.

Therefore, Instead of being a physical hardware device, a software calculator is one that has been implemented as a computer program.

Learn more about function here:

https://brainly.com/question/18065955

#SPJ5

i really need help please im about to give up

Answers

Answer:

true

Explanation:

because I ain't stupid

what is computer?write feature of computer​

Answers

Answer:

An electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program is computer.

And it's feature are:

Multitasking.Accurate & Speed.Efficient.Reliability.Recoverability

what is a computer?.

a computer is a electronic device that works under the control of information stored in its memory.

features of a computer

multitasking.

When was JavaScript founded?
Write in this format:
mm/yy

Answers

Answer:

It was founded in 09/95

Explanation:

Answer: 09/1995

JavaScript was founded in the September of 1995, in early fall. It is a very common dynamic computer programming language.

I wrote the answer in mm/yy format, so this answer should meet the requirements.

Hope this helps! Best of Luck!

Use the drop-down menu to complete the steps for using the Autofill feature. Click the . Click the . Drag the to the desired range. Click the Autofill option you want to use.

Answers

Answer:

Cell,fill handle,fill handle

Explanation:

Trust

Answer:

Guy up top is correct, it's Cell, Fill handle, Fill handle, in that order

Explanation:

idk just anwser this and get get some points lol

Answers

Answer:

ok thxxxxx :)

Explanation:

Answer:

thank you

Explanation:

How can I crack a computer password?

Answers

Try to use easy passwords first like the persons birthday fav color etc then move on to harder passwords

Plz plz plz help QUICKLY idk the answer and I really need help

Answers

Answer:

productivity is the correct answer

Even after charging your smartphone for several hours, it still appears completely turned off and will not tum on What should you try next to restore it
to health?
A.)submerge it in a bag of rice for 24 hours
B.)perform a hard reset
C.)perform a soft reset
D.)plug it into a charger for another hour

Answers

B. Perform a hard reset. Hold home and power I think.

Answer:

C: perform a soft reset

Explanation:

Just took the test, got 100.

does anyone know what type of Honda this is and the year of it lol this isn’t school related

Answers

my car guy boyfriend said that he thinks its a van due to the space and its definitely a newer Honda but not sure what year. he said don't quote him on it  tho lol

(02.05 LC) What is an example of a web browser? Bing Firefox Instagram Yahoo

Answers

Answer: Firefox

Explanation:

Bing and Yahoo are search engines. Instagram is an example of social media. Firefox is a wed browser. A web browser is a window that allows you to open up new tabs. the other three are examples of tabs you can open with Firefox.

Answer:

firefox

Explanation:

Other Questions
A coordinate grid with 2 lines. The first line is labeled f(x) and passes through (negative 4, 3), (0, 3) and (4, 3). The second line is labeled g(x) and passes through the points (negative 2, negative 5), (0, negative 2), and (2, 1)Determine the input value for which the statementf(x) = g(x) is true.From the graph, the input value is approximately (2) (2.5) (3.5) or (4).f(x) = 3 and g(x) = 3/2x 2 3 = 3/2x 25 = 3/2xThe x-value at which the two functions values are equal is (2/3) (3/2) (5/3) or (10/3). Carlos states that planets that are closer to the sun have a higher surface temperature than those that are further from the sun. Why do you think Carlos is correct or incorrect? Why did people come to the new world PLEASE HELPFill in the blanks below with the correct words:1. Une fille: ________ (plural)2. L'imprimante:________ (plural)3. Le crayon: ___________(plural)4. L'lve: ___________ (plural)5. Il est stress. Elle est ___________ (feminine form of the same adjective).Fill in the correct forms of the verb avoir in the blanks below:6. Est-ce que tu__________le crayon? Non, mais j' _________ le cahier!7. Nous__________ 18 ans. Et vous, vous__________ 18 ans aussi?8. Elles_____________ un ordinateur? PLZ HELP WILL MARK BRAINLEST 2 or more have to answer and its timed 1 hour Why is brainliest so important and why is leveling up so important who can spell albuquerque first gets brainliest and 56 points Any tips for my drawing of Flo milli Need help with thisMARKING PEOPLE AS BRAINLIST what changed for the american people as a result of the 7th amendment PLEASE HELP!!!!!WXYZ is a kite. Angle WXY has a measure of 133 degrees and angle ZWX has a measure of 60 degrees. Find the measure of angle ZYW. evaluate the expression 81-8^2 whats the slope between these points (3,2) and (6,5) Solve -40=3m-16 for m I don't know what I'm supposed to do, can someone explain this to me please??? i'm awarding brainliest and 50 points no joke. Give three examples of government control over the factors of production in a command economy. How do opioids affect the brain? :) I WILL GIVE BRAINLIEST What is the domain of h^-1(x) what phrases are repeated this poem. sketch by carl sandburg what is the answer to :4 x 10 2 x 1012