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]
3 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]3 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
Every workplace should have an emergency plan of action.
pochemuha

Answer:

yes i agree with that the answer is in fact true

Explanation:

follow my in sta gram at grac.ehihi

6 0
2 years ago
Read 2 more answers
A pointing device uses light to determine hand motion.
kirill [66]
The answer to this is Optical mouse. 

The reason the answer is optical mouse is because the optical mouse is a computer mouse which uses a light source, typically a light-emitting diode, and a light detector, such as an array of photodiodes, to detect movement relative to a surface. 

Hope this helped :)
have a great day 
3 0
3 years ago
Disadvantage do you think one can have if he or she does use electronic media
Dima020 [189]
- discontinuity
- dependence on the electric power
and more
6 0
3 years ago
How to revive a computer if it functions in an unexpected manner?
julsineya [31]
This would depend on the issue the computer is having. 

In many cases though a simple reboot does the trick. 

If your computer is slow and glitches, try cleaning it for viruses and also clean the fans. If they are dusty the computer can overheat and that can cause it to slow while its working harder to cool down.

In other cases you may not be running the proper software compatible with your device, or programs may be outdated. Check online with the company that manufactured your computer to see if you need to install updates or change certain software. 

3 0
3 years ago
1. List 2 items that are included as administrative information in a health record.
sleet_krkn [62]

Administrative, Billing data and progress notes. Also Patient Demographics.

6 0
3 years ago
Other questions:
  • What term is used to describe a chipset developed and promoted by the U.S. government from 1993 to 1996 as an encryption device
    9·1 answer
  • In this problem we consider sending real-time voice from Host A to Host B over a packet-switched network (VoIP). Host A converts
    12·1 answer
  • On five lane roadways, the center lane is designated for __________ and is used by vehicles traveling in both directions.A. Thro
    15·1 answer
  • When assigned to a cell, the __________ function returns a number that corresponds to the system date and time beginning with De
    12·1 answer
  • Describe the procedure for creating a table or spreadsheet in a presentation slide.
    13·1 answer
  • Ujqwgydft frrhyy4e uvbw vhrwbhv vbyrewblv?
    14·1 answer
  • Video is a medium that's looks real anyways, but is real________________.
    10·1 answer
  • If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
    6·2 answers
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!