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
What is the default text-wrapping option when inserting images into a Word document?
JulijaS [17]

Answer:

In line with the text

Explanation:

8 0
3 years ago
Read 2 more answers
ASAP!!!!****** Need help!!!!
m_a_m_a [10]
I think it's right. 
<span>Text, numbers, graphics, or sound represented by discrete digits, such as 1s and 0s.</span>
6 0
3 years ago
Which of the following is not an example of a technological aid?
emmainna [20.7K]
I think the correct answer among the choices given is option A. Manipulative aids are not technological aids. It refers to items that is used to support hands-on learning like markers, toothpick or coins. Technological aids, on the other hand, are things which makes use of the new technology present like slideshows, DVD's, audioclips and projectors.
6 0
3 years ago
The marketing company era marks the time when companies realized they needed to switch from just trying to sell
djverab [1.8K]

Answer:

False

Explanation:

I hope this is right

7 0
3 years ago
Convert the following three hexadecimal numbers to both binary and decimal. (Hint: it is probably easier to convert hex to binar
Doss [256]

Answer:

3e : 00111110 (62)

3e0 : 0000001111100000 (992)

3e00 : 0011111000000000 (15872)

Explanation:

Converting the given hexadecimal numbers to binary and decimal format:

1) 3e

3-> 0011

e-> 1110

Combining , 3e -> 00111110

This can be converted to decimal by multiplying each 1 in the binary representation by 2^(position -1) and adding the results.

So 3e = 32+16+8+4+2 = 62

2) 3e0

Binary => 0000001111100000

Converting to decimal : 992  [ This is 16 times a]

3) 3e00

Binary => 0011111000000000

Converting to decimal : 15872 [ This is 16 times b]

So adding a 0 to the hex representation multiplies the decimal number by 16.

6 0
3 years ago
Other questions:
  • If using the md5 hashing algorithm, what is the length to which each message is padded?
    11·1 answer
  • Which amendment discussed in the unit do you think has the greatest effect on your life? Why?
    14·1 answer
  • "Because Standard Error and Standard Ouput represent the results of a command and Standard Input represents the input required f
    6·1 answer
  • When I try to invite someone to be my friend on brainly, for some people, it says, "Somethings up. Invitation wasn't sent". Can
    8·1 answer
  • HELP FOR JAVASCRIPT: 01. What is prototypical inheritance? 02. How can JavaScript be used to improve accessibility on the web? I
    6·1 answer
  • You have to calculate the total amount you spent at the mall today. Which function should you use to do so?
    6·2 answers
  • 10 points!
    12·1 answer
  • Write two examples of hard copy output?​
    9·1 answer
  • You are a teaching assistant for an introductory computer concepts course at your local community college. The instructor asks y
    11·1 answer
  • Which of these technologies has been most used by terrorist organizations?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!