Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A, B, C, D, E" is correct. Each question has one correct answer. Thank you. Part 1 - 9. In Java, composition is said to use __ relationship. A. is-a B. part-of C. has-a D. both is-a and part-of E. both has-a and part-of Part 2 - 10. Given the following code, which statement is true? class Water() { ... } class Juice() extends Water { ... } class Apple() { ... } class ApplePie() { Apple a1 = new Apple(); } class AppleJuice() { Apple a1 = new Apple(); Water w1 = new Water(); } A. Juice is a superclass and Water is a subclass. B. ApplePie is a superclass of Apple. C. ApplePie is a composite class that contains an instance of Apple class. D. AppleJuice is a superclass that contains an instance of Apple class and an instance of Water. E. Water is a composite class that contains an instance of Juice.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A, B, C, D, E" is correct. Each question has one correct answer. Thank you.
Part 1 - 9. In Java, composition is said to use __ relationship.
A. is-a
B. part-of
C. has-a
D. both is-a and part-of
E. both has-a and part-of
Part 2 - 10. Given the following code, which statement is true?
class Water() { ... }
class Juice() extends Water { ... }
class Apple() { ... }
class ApplePie() { Apple a1 = new Apple(); }
class AppleJuice() { Apple a1 = new Apple(); Water w1 = new
Water(); }
A. Juice is a superclass and Water is a subclass.
B. ApplePie is a superclass of Apple.
C. ApplePie is a composite class that contains an instance of Apple class.
D. AppleJuice is a superclass that contains an instance of Apple class and an instance of Water.
E. Water is a composite class that contains an instance of Juice.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps