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
1. Which of the following is NOT an example of systems software? (Points : 1)
vladimir2022 [97]
The answer is "operating systems" brcause you need that that to use the rest
' 
4 0
3 years ago
Read 2 more answers
Linguist study_____
-Dominant- [34]
That's B.

Linguist love all kinds of studies of languages culture writing etc.
6 0
3 years ago
I do not understand what the are asking in csys 1.3.6
Amiraneli [1.4K]

Can i see the note????

6 0
3 years ago
Windows administration allows a certain level of access for a file or folder to be assigned to a(n) ____________________ rather
soldi70 [24.7K]

Answer:

Group

Explanation:

A folder assigned to a single user can only be accessed by a single person, to get many users access a folder windows administrator shares a folder to a workgroup. using the simple steps below.

Login as the admin of the system, Right-click on the folder you want to give permission on, after clicking on properties, click on security, add user or group after clicking the edit. and your folder is shared to a group and all users in the group have access to it.

6 0
3 years ago
you are troubleshooting an inkjet printer . users report that the printer is printing in the wrong colors. the problem just star
monitta

The likely cause of the printer printing in the wrong colors includes:

  • Ink cartridges installed in the wrong spot
  • leaking ink cartridges

<h3>What is a inkjet printer?</h3>

This refers to a computer peripheral that produces hard copies of a text document or photo by spraying droplets of ink onto paper.

In conclusion, the likely cause of the printer printing in the wrong colors includes ink cartridges installed in the wrong spot and leaking ink cartridges.

Read more about inkjet printer

brainly.com/question/4962501

#SPJ4

6 0
2 years ago
Other questions:
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • IblMessage.txt=welcome to fiji.what is the error in the coding and what type of error is it?(explain)​
    5·1 answer
  • DO MOBILE DEVICES HAVE TO WORK IN LIMITED SCREEN SPACE
    11·2 answers
  • To ____ a public member function of a base class in the derived class, the corresponding function in the derived class must have
    12·1 answer
  • Explain how to utilize the computer in rooms management.​
    13·1 answer
  • 4.8 code practice question 2 edhesive
    12·1 answer
  • What are the types of technology that is use in education and what are their usages​
    8·1 answer
  • a client has requested adjustments to the arrangement and placement of elements on an image. what does the client want changed?
    9·1 answer
  • Finish the format string to get the output shown below.<br> Day<br> &gt;&gt;&gt;{ v8'_format('Day)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!