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
algol [13]
3 years ago
14

Write an interface, PointingDevice, containing: an abstract method, getXCoord that returns an int an abstract method, getYCoord

that returns an int an abstract method, attentionRequired that returns a boolean an abstract method, setResolution that accepts a double and returns a double
Computers and Technology
1 answer:
vaieri [72.5K]3 years ago
4 0

Answer:

Following are the code in java language

abstract interface PointingDevice // interface  PointingDevice,

{

// abstract method getXCoord()

public abstract int getXCoord();

// abstract method getYCoord()

public abstract int getYCoord();    

// abstract method attentionRequired()

public abstract boolean attentionRequired();  

// abstract method setResolution( )

public abstract double setResolution(double a);  

}

Explanation:

In this code we have declared a abstract interface "PointingDevice" which contains the four abstract method getXCoord of type int , getYCoord() of type int , attentionRequired() of type boolean and setResolution() of type double .

These method have only declaration not definition any interface or class which inherit the inteface PointingDevice must define all these four method otherwise it also be abstract .

You might be interested in
Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O
brilliants [131]

Answer:

if(a < 10)

{ b = 0; c = 1;}

else

{ b = -99; c = 0;}

Explanation:

4 0
3 years ago
See the file attached!​
Dimas [21]
  1. Mail Merge is a handy feature that incorporates data from both Microsoft Word and Microsoft Excel and allows you to create multiple documents at once, such as letters, saving you the time and effort of retyping the same letter over and over.
  2. The Mail Merge feature makes it easy to send the same letter to a large number of people.
  3. By using Mail Merge, we don't have to type each recipient's name separately in each letter.
  4. We need to proofread only the main document network database systems object- oriented database system Hierarchical database system.
6 0
2 years ago
Why do astronomers prefer to use the reflecting telescope rather than the refracting telescope to view distant objects in space?
sdas [7]
C is the right answer
7 0
4 years ago
Read 2 more answers
Write c++ program to find maximum number for three variables using statement ?​
pantera1 [17]

Answer:

#include<iostream>

using namespace std;

int main(){

int n1, n2, n3;

cout<<"Enter any three numbers: ";

cin>>n1>>n2>>n3;

if(n1>=n2 && n1>=n3){

cout<<n1<<" is the maximum";}

else if(n2>=n1 && n2>=n3){

cout<<n2<<" is the maximum";}

else{

cout<<n3<<" is the maximum";}

return 0;

}

Explanation:

The program is written in C++ and to write this program, I assumed the three variables are integers. You can change from integer to double or float, if you wish.

This line declares n1, n2 and n3 as integers

int n1, n2, n3;

This line prompts user for three numbers

cout<<"Enter any three numbers: ";

This line gets user input for the three numbers

cin>>n1>>n2>>n3;

This if condition checks if n1 is the maximum and prints n1 as the maximum, if true

<em>if(n1>=n2 && n1>=n3){</em>

<em>cout<<n1<<" is the maximum";}</em>

This else if condition checks if n2 is the maximum and prints n2 as the maximum, if true

<em>else if(n2>=n1 && n2>=n3){</em>

<em>cout<<n2<<" is the maximum";}</em>

If the above conditions are false, then n3 is the maximum and this condition prints n3 as the maximum

<em>else{</em>

<em>cout<<n3<<" is the maximum";}</em>

return 0;

3 0
3 years ago
Here is the list of problems to choose from:
olya-2409 [2.1K]

Answer:

There's a parking lot that is 600m² big. The lot must be able to hold at least 3 buses and 10 cars.

Each car takes up 6m² and each bus takes up 30m².

However, there can only be 60 vehicles in the lot at any given time.

The cost to park in the lot is $2.50 per day for cars and $7.50 per day for buses. The lot must make at least $75 each day to break even.

What is a possible car to bus ratio that would allow the lot to make profit?

3 0
3 years ago
Other questions:
  • A tool that is used to search for and gather data from a page on the internet is called a ?
    11·2 answers
  • To what device, inside the computer, do all other devices connect
    10·2 answers
  • You can use ???? a to test tread wear on your tires
    14·2 answers
  • What is UNIX? A program for writing documents Graphical interface Internet browser Operating system
    8·2 answers
  • An electronic storage file where information is kept is called a cpu. true false
    11·1 answer
  • The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the
    8·1 answer
  • Implement function bin2dec that takes a binary number bin_num as a string argument and prints out the corresponding decimal numb
    9·1 answer
  • Your job is to choose a data structure to implement polynomials whose coefficients are positive integers, such as 17x^4+4x^3+0x^
    9·1 answer
  • HELP THIS IS SO DIFFICULT
    10·2 answers
  • How does robotic process automation (rpa) differ from intelligent automation
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!