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
ankoles [38]
2 years ago
13

For the questions below, consider a class called ChessPiece. This class has two instance data, String type and int player. The v

ariable type will store "King", "Queen", "Bishop", etc and the int player will store 0 or 1 depending on whose piece it is. We wish to implement Comparable for the ChessPiece class. Assume that, the current ChessPiece is compared to a ChessPiece passed as a parameter. Pieces are ordered as follows: "Pawn" is a lesser piece to a "Knight" and a "Bishop", "Knight" and "Bishop" are equivalent for this example, both are lesser pieces to a "Rook" which is a lesser piece to a "Queen" which is a lesser piece to a "King."22) Which of the following method headers would properly define the method neededto make this class Comparable?
A) public boolean comparable(Object cp)
B) public int comparable(Object cp)
C) public int compareTo(Object cp)
D) public int compare To( )
E) public boolean compareTo(Object cp)
Computers and Technology
1 answer:
Marina86 [1]2 years ago
3 0

public boolean comparable(Object cp) headers would properly define the method neededto make this class Comparable.

A) public boolean comparable(Object cp)

<u>Explanation:</u>

Chesspieces is class is declaring in programming languages such c++ or python or java. Inside Chesspiece class declare with two variables names, First variable  data type is string which holds names chess board character such as “Queen”, “king” , “Bishop”, and other variable stores Boolean values false or true.

This program is meant for chess games. Moreover the class been compared zero or one on each character of chess  games.

To compare end user pass the parameter and get the Boolean value either false or true.

You might be interested in
You are a network technician for a small network. Your ITAdmin workstation just stopped communicating with all other computers i
Lelu [443]

Answer:

Ping the other workstations from the IT Admin workstation to confirm that connection has been lost, check the status of the network interface card in the workstation with command ifconfig in the terminal, then reset the connection using ifdown and ifup commands. If the problem is not resolved, check the cable connection.

Explanation:

Ping is an ICMP echo message sent by a network host to another to check for connectivity. If they are connected, the other workstation responds with an ICMP response message.

The ifconfig in Linux systems displays the network adapters and their individual IP configurations. If there is no connection even after the network is reset, then the cable connectors could be the problem.

8 0
3 years ago
In what way can a costume be deleted ?
alex41 [277]

Answer:

Clicking the "X" button towards the upper-right of each costume's icon in the Costume Pane will delete

Explanation:

5 0
2 years ago
In Microsoft Access, what happens when you save a query once and run it but then add more to the query? What will happen? a)erro
Usimov [2.4K]
D)When the query is run again, the data that meets the new criteria will be retrieved.
5 0
3 years ago
A time management tool in a help desk software package probably has the greatest impact on the productivity of _____.
777dan777 [17]

A time management tool in a help desk software package probably has the greatest impact on the productivity of help desk agent.

<h3>What is  help desk software ?</h3>

IT and customer service teams utilize help desk software to assist staff members and customers. Its primary purposes include assisting service teams in methodically managing support requests, offering alternatives for self-service, monitoring and reporting performance, and ideally doing much more.

The objectives and procedures of a help desk when employed by an IT team are established using industry and governmental best practices, such as ITIL (Information Technology Infrastructure Library). The aim of ITIL while handling problems, according to Mikkel Shane, CEO of Zendesk,  is to "establish regular service operation as rapidly as possible and minimize the adverse effect on business operations.”

Simply put, help desk support software is made to provide you with the means of helping your clients feel heard. Here is a little explanation of how it operates:

To know more about help desk software :

brainly.com/question/24171638

#SPJ4

3 0
1 year ago
Which of the following statements best describes how digital photographs can be used?
kipiarov [429]

Answer:

umm wheres the options so we can answer it and ty

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Why should ERP architecture include a discussion on organizational structure, business processes, and people, instead of just in
    5·1 answer
  • What is aperture priority mode? When might you use this mode on a camera? What is depth of field? How can you adjust the depth o
    13·1 answer
  • If you do not want to keep a change made by the autocorrect feature, you can click the ____ button on the auto correction option
    12·1 answer
  • How does the post process alert the user if it detects a hardware problem during the post process?
    6·1 answer
  • customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft Pow
    5·1 answer
  • In Excel, you can sort a table by one or more columns by.
    7·1 answer
  • What are the benefits of writing functions that use parameters and return List 2 please and explain what is return
    12·1 answer
  • A characteristic often associated with entrepreneurship is
    9·1 answer
  • Can someone make me a natural selection comic but only 5 same thing in the example pic but draw the animal different and a diffe
    11·1 answer
  • Which steps of the management science process can either be a recommended decision or information that helps a manager a decisio
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!