44
A method signature defines which of the following? (choose all that apply)
return type
name
call
parameters
body
45
An abstract class can be implemented using the implements keyword.
True
False
46
An abstract class can be extended using the extends keyword.
True
False
47
Abstract classes are represented in UML by:
italics
underline
plus/minus
bold
48
An abstract class is a superclass for a subclass.
True
False
49
These symbols are used to denote an interface in a UML diagram.
angle brackets
square brackets
parentheses
curly braces
50
This mechanism specifies a set of methods that an implementing class must override and define.
static class
polymorphism
constructor
interface
44. return type name call parameters 45. False 46. True 47. italics 48. True 49. square brackets 50. polymorphism
44 A method signature defines which of the following? (choose all that apply) return type name...
In Java Which of the following statements declares Salaried as a subclass of payType? Public class Salaried implements PayType Public class Salaried derivedFrom(payType) Public class PayType derives Salaried Public class Salaried extends PayType If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method. False True When a subclass overloads a superclass method………. Only the subclass method may be called with a subclass object Only the superclass method...
(1) ____ is the principle that allows you to apply your knowledge of a general category to more specific objects. a. Inheritance c. Encapsulation b. Polymorphism d. Override (2) When you create a class by making it inherit from another class, you are provided with data fields and ____ automatically. a. fonts c. class names b. methods d. arrays (3) By convention, a class diagram contains the ____ following each attribute or...
QUESTION 11 Which of the following could never be found in the file NewClass.java? public NewClass() { message = “Hello World!”; } public String title = “New Class”; public void doSomething() { doSomethingElse(); } public OtherClass() { message = “Hello, World! Good to see you again!”; } 2 points QUESTION 12 Match the terms to the corresponding definition below. - A. B. C. D. E. ...
1-Suppose you write an application in which one class contains code that keeps track of the state of a board game, a separate class sets up a GUI to display the board, and a CSS is used to control the stylistic details of the GUI (for example, the color of the board.) This is an example of a.Duck Typing b.Separation of Concerns c.Functional Programming d.Polymorphism e.Enumerated Values 2-JUnit assertions should be designed so that they a.Fail (ie, are false) if...