Exam 7: Object-Oriented Design

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In which phase of program development would you expect the programmer(s) to create the pseudocode?

(Multiple Choice)
4.8/5
(35)

Interface classes cannot be extended but classes that implement interfaces can be extended.

(True/False)
4.8/5
(39)

Static methods cannot

(Multiple Choice)
4.8/5
(36)

Code Description Ch 07-1 Consider a class called ChessPiece. This class has two instance data, String type and int player. The variable 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" a "Bishop" and "Knight" are equivalent for this example both "Bishop" and "Knight" are lesser pieces to a "Rook" a "Rook" is a lesser piece to a "Queen" a "Queen" is a lesser piece to a "King". -Refer to Code Description Ch 07-1: Write a static method that is passed two ChessPieces and determines if the two pieces are owned by the same player. It should return true or false.

(Essay)
4.9/5
(36)
Showing 41 - 44 of 44
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)