Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA Write True or False . If False, explain why? (5 points) 1. When a programme

ID: 3676518 • Letter: J

Question

JAVA

Write True or False. If False, explain why? (5 points)

1. When a programmer creates a JFrame, a minimum of at least one menu with two menu items must be created and added to the JFrame.

2. A “has-a” relationship is implemented via inheritance.

3. A Car class has a “has-a” relationship with the Brakes class and Engine class.

4. All methods in an abstract class must be declared as abstract methods.

5. A static import declaration (usually the packageName.className.*) enables you to refer to imported static members of a class without the className and a (.) dot.

Explanation / Answer

Multiple Questions : Answering 1st 4 Questions.

1. False. A JFrame does not require any menus

2. False

"has-a" is a composition relationship where one object "belongs to" another object. "is-a" is implemented via inheritance.

3. True

4. False.

Abstract class can have non-abstract methods. But if a class contains abstract method , then the class should be abstract.