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

1, Assume an employee can work for only one company. What is the best suitable r

ID: 3909935 • Letter: 1

Question

1, Assume an employee can work for only one company. What is the best suitable relationship between Company and Employee?

None

Aggregation

Inheritance

Composition

2, An interface cannot extend more than one interface.

true

false

3, The methods parseInt, parseDouble, parseFloat, parseLong are in the classes Integer, Double, Float, and Long to convert a numeric string into an integer, double, float, or long.

true

false

4, Which of the following is poor design?

A data field is derived from other data fields in the same class.

A method must be invoked after/before invoking another method in the same class.

A method is an instance method, but it does not reference any instance data fields or invoke instance methods.

A parameter is passed from a constructor to initialize a static data field.

Explanation / Answer

1, Assume an employee can work for only one company. What is the best suitable relationship between Company and Employee?

Composition

2, An interface cannot extend more than one interface.

FALSE, It can extend more than one

3, The methods parseInt, parseDouble, parseFloat, parseLong are in the classes Integer, Double, Float, and Long to convert a numeric string into an integer, double, float, or long.

true

4, Which of the following is poor design?

A parameter is passed from a constructor to initialize a static data field.



Thanks, PLEASE UPVOTE if helpful