Author | Message |
---|---|
amclees2
Posts: 12
|
Posted 11:48 Feb 12, 2018 |
These questions seem to be asking fairly unambiguously about Java but they don't specify. Are they about Java? Section I - 23, 29, 30, 31, 33, 34 Section II - 1 Section III - 2
Section 1 8 - Who's definition of OOP should we use? Traditional OOP principles do not align with Java for some of the answers. 9 - The answer about checked exceptions here is sometimes true in the context of Java, but it is not true for RuntimeException or its subclasses. Since it is only sometimes, should we leave the box unchecked? 10 - What exactly is "Regular" code? 19 - There are cases where inheritance affects access in Java. Should this be considered a part of how a class protects its code?
Class variable here seems to mean variable of type class but usually refers to static variables in languages that handle memory in a way that doesn't allow for true 'static' variables. Java reflection allows classes to be stored in variables which are subclasses of object. In Ruby and Python, classes are objects. |
marrawi
Posts: 21
|
Posted 12:32 Feb 12, 2018 |
For section 1, 10: Separating Error-Handling Code from "Regular" Code is one of the advantages of exceptions. "Exceptions provide the means to separate the details of what to do when something out of the ordinary happens from the main logic of a program. In traditional programming, error detection, reporting, and handling often lead to confusing spaghetti code." more here: https://docs.oracle.com/javase/tutorial/essential/exceptions/advantages.html
|
zilongye
Posts: 8
|
Posted 14:19 Feb 12, 2018 |
Yes, the questions are referring to Java. |