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

Please use the following terms to describe the use cases below Encapsulation, In

ID: 3599111 • Letter: P

Question

Please use the following terms to describe the use cases below Encapsulation, Inheritance, Polymorphism, Overriding, Overloading, Implementation. (There may be more than one instance of the terms An interface Spinnable has one function spin0. A Wheel and a Disk both provide the Spinnable interface. IChoose ] The Integer class support two versions of parselnt0 one that takes only a String, the other that takes a String and an integer (for base). Choose ] RuntimeException is a special case of Exception that occurs only at runtime Choose ] A method called drive) expects aChoose Vehicle but is given a Car instead because a Car is a Vehicle The analyst asks for the method calculateProfit to be hidden because he does not want to expose business rules. Choose ] A Thermometer class has methods to accept both Centigrade and Fahrenheit as inputs but internally uses on Centigrade for all its calculations. Choose ] JOptionPane's showMessagDlogChoose uses multiple versions to support custom calls. The way area is calculated using getArea0 method is different for Circle, Square and Triangle, although all of them are Shapes. IChoose ] A BoardGame and Violin are both Playable objects and therefore implement a play method IChoose ] An Array object knows how to resize itself as needed. Choose ]

Explanation / Answer

1. Inheritence
because the wheel and disk classes are inheriting the base cass spinnable

2. Overloading
in overloading we use same method name with different type of arguments.

3. Implementation
We write all the exception cases while implementatio only

4. Polymorphism
One method will give different behaviours in different contexts.

5. Encapsulation
Because in this he is hiding business rules to the outer world.

6. Overriding

7. Overloading

8. Polymorphism

9. Polymorphism

10.Implementation