Question 1 In object-oriented programming, software objects model \'things\' in
ID: 3756518 • Letter: Q
Question
Question 1
In object-oriented programming, software objects model 'things' in the system being modeled. What part of the code models an action that can be performed by an object?
Question 2
How should instance variables normally be declared?
Question 3
You should be able to write definitions for the terms coupling and cohesion as they are used to evaluate the organization of classes. Which of the following is true?
Question 4
Which of the following is NOT a Javadoc tag you will use this quarter?
Question 5
In a Java program, how is a composition or "HAS-A" relationship implemented?
Question 6
What tool is used to show inheritance and composition relationships among classes.
Question 7
Which of the following is a specialized version of a class.
Question 8
If class Apple extends class Fruit, which of the following is also true?
Question 9
If class Apple extends class Fruit, which of the following is also true?
Question 10
Which of the following statements creates a composition (or aggregation) relationship?
A. an instance variableExplanation / Answer
1. C. a method definition
The method models action that can be performed by an object. It contains all the operations that can be performed.
2. A. private
Normally they should be private to satisfy data abstraction feature.
3. C. Coupling between classes should be minimized; cohesion within a class should be maximized.
The classes need to have high cohesion inside the class and minimum dependency among the classes.
4. D. @version
5. A. by using an instance variable
Has-A relationship means an instance variable of one class having reference to an instance of another class or to another instance of the same class.
6. A. a family tree
7. B. a subclass
A subclass or derived class is a specialized version of a class.
8. E. All of the above
9. E. All of the above
10. D. private Boo myThing;
Here an instance of Boo is created and if it used in another class then that become an composition relationship
Please check the code. If you have any doubts comment below and i am happy to help :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.