NAME Directions: Answer all questions. You may refer to the textbook, handouts,
ID: 3733104 • Letter: N
Question
NAME Directions: Answer all questions. You may refer to the textbook, handouts, or no taken in class. Do not use any computer or calculator. If you prefer, each questi can be answered in the exam booklet provided. Hand in all papers, with answers clea marked and with your name on each sheet. The questions are worth the points indicat i. (10 points) Answer TRUE or FALSE i. The information used to define how an object behaves is called its representation i. A Python class method must always have at least one parameter. iii. The representation of an object should be invisible to users of that object. Procedural abstraction means explaining the details of how a func- tion performs its task. Each step of an algorithm is always mathematically precise. vi. The method call c a.sub (b) does the same thing as c - v. a-b vii. Abstraction manages complexity by hiding implementation details. vii. Inheritance is a way to reuse the same code for different types of data. ix. In a sequence diagram, when one object's method calls the method of another, an arrow is drawn between the lines of both objects. x. To combine separate shapes into a drawable object whose parts move together, the Layer class is used. ii. (30) A quaternion is a kind of number which describes how physical o spin. It combines 4 real number values, real, i.val, j.val and k.v these values are a, b, c, and d, respectively, the a + bi + cj + dk. Write the functions .init..(self, r, i.val, k.val) and .tr.-.(self) for the Python Quaternion class.Explanation / Answer
Solution:
The first question is done as per Chegg guidelines, please repost others.
i)
True
Explanation:
This is the definition of an object.
ii)
True
Explanation:
One parameter is necessary
iii)
False
Explanation:
It is not necessary but it depends, what kind of object it is.
iv)
True
Explanation:
Procedural abstraction is the idea that each method should have a coherent conceptual description that separates its implementation from its users
v)
False
vi)
true
vii)
True
viii)
True
ix)
True
x)
True
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.