Which of the following is poor design?
a. A data field is derived from other data fields in the same class.
b. A method must be invoked after/before invoking another method in the same class.
c. A method is an instance method, but it does not reference any instance data fields or invoke instance methods.
d. A parameter is passed from a constructor to initialize a static data field.
a. A data field is derived from other data fields in the same class.
b. A method must be invoked after/before invoking another method in the same class.
c. A method is an instance method, but it does not reference any instance data fields or invoke instance methods.
d. A parameter is passed from a constructor to initialize a static data field.
abcd A is not good because there is no need to define the data field if it can be derived from other data fields. B is not good because it is highly problematic to impose any order for invoking the methods. C is a bad design because in this case the method should be defined as static. D is not good because a static data field is now tied to the creation of a specific object, which should not be the case.
You might also like to view...
In what circumstances is it better to access such files sequentially?
What will be an ideal response?
The list-style property is the shorthand property for list styles.
Answer the following statement true (T) or false (F)
The part of the security policy that defines what company resources can be accessed from home is
A) The acceptable use part B) The physical access part C) The remote access part D) The emergency procedures part
NAP is an umbrella of security protection features that monitor and manage a server and its clients.
Answer the following statement true (T) or false (F)