Java c and c all allow use of comments which of the


1. Which of the following statements is/are true?

A. Object names are***** the bottom section of a UML diagram.

B. Attribute names are***** the bottom section of a UML diagram.

C. Method names are***** the bottom section of a UML diagram.

D. Class names are***** the bottom section of a UML diagram.

E. None of the above

2. Java, C#, and C++ all allow use of comments. Which of the following represent(s) valid comments in these three languages?

A. /* Comment */

B. //* Comment */

C. // Comment //

D. //Comment

E. All of the above

F. None of the above

3. Attributes represent the _____ of an object because they store information about that object.:

A. state

B. behaviors

C. size

D. accessibility

4. If a programmer explicitly defines a constructor that accepts parameters, he or she should also define a _____ version, as a best practice.

A. private

B. public

C. static

D. default

E. None of the above

5. One of the ways object-oriented languages protect object data is through _____.

A. integration of objects

B. universal data access

C. encapsulation

D. the public accessor

E. All of the above

6. Accessors such as "+" and "-" can be used to dictate how external programs, objects, and entities interact with _____.

A. an entire class only

B. all attributes and methods in a class

C. attributes of a class only

D. methods of a class only

E. None of the above

7. A black box is a term used to describe a system that can be understood solely based on its inputs, the resulting outputs and _____.

A. its object-specific instantiated behavior

B. its object-specific state at any given time

C. a detailed understanding of its implementation

D. a basic understanding of its implementation

8. One of the benefits of _____ is that it allows the implementation of a class to change without affecting external entities using that class.

A. abstraction

B. encapsulation

C. instantiation

D. construction

9. Which of the following is a proper implementation setter?

A. int setAge() { return age;}

B. void setAge(int age) {this.age = age;}

C. void setAge(int newAge) {return age;}

D. void setAge() {return age;}

10. Identify the attribute declaration(s) below that most likely contribute to the concept of information/data hiding and is correctly declared.

A. private age;

B. int age;

C. int private age;

D. public int age;

E. None of the above

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Java c and c all allow use of comments which of the
Reference No:- TGS01043510

Expected delivery within 24 Hours