Answer:
(c) the dynamic type of reference will determine which of the methods to call.
Explanation:
Polymorphism in Object Oriented Programming typically means the same method name can cause different actions depending on which object it is invoked on. Polymorphism allows for dynamic binding in that method invocation is not bound to the method definition until the program executes.
So in the case of Animal superclass and Mammal subclass, both having a method called eat() with identical signatures and return types, depending on which reference, the correct method eat() will be called dynamically upon execution.
For example, if we have the following;
================================
<em>Mammal mammal = new Animal();</em>
<em>mammal.eat()</em>
================================
The eat() method that will be called is the one in the Mammal subclass.
However, if we have;
================================
<em>Animal animal = new Animal();</em>
<em>animal.eat()</em>
================================
The eat() method of the Animal superclass will be called.
A security certificate is used to ensure that your web browser and the server you are connected to have a tamper-free, secure connection.
Answer:
The code requests for the scores of three students for three courses offered by each student.
It calculates and print the average score for each student
Explanation:
The code written in Python programming language uses a while to get student 1-3 and a for loop to get scores for course 1-3
See attached code and output
Answer:
d) 13 people
Explanation:
According to the Pigeonhole Principle, it states that given that several X commodities are placed into Y containers, and the number of X commodities is greater than the number of Y containers, then there will be a minimum of one Y container having more than one X commodities.
Hence, in this case, since the month is 12 in numbers, then to have at least two people in the group whose birthdays fall in the same month, the group must be at least 13 people.