Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

True/False Questions on Data Abstraction 1. To implement an ADT in Python, you must use classes. 2. If the programming language supports classes, you should

True/False Questions on Data Abstraction

1. To implement an ADT in Python, you must use classes.

2. If the programming language supports classes, you should usually use them when implementing an ADT.

3. Class variables can be shared by all instances of a class.

7. Subclasses inherit methods defined in their superclasses.

8. Operator overloading allows programs to compute results that could not be computed without operator overloading.

Multiple Choice

2.Which parts of the program description will be the most helpful in identifying possible objects for a system design?

a) adjectives

b) nouns

c) verbs

d) all of the above

7. If you are designing a class to represent a polynomial, which of the following should be instance variables?

a) the coefficients

b) a value to evaluate with the polynomial

c) the result of evaluating the polynomial with a specific value

d) all of the above

8. If you are designing a class to represent a polynomial, which of the following should be class variables?

a) the coefficients

b) a value to evaluate with the polynomial

c) the result of evaluating the polynomial with a specific value

d) none of the above

9. When writing unit tests using the Python unittest framework the test code is written as

a) a number of functions

b) a separate class the subclasses your class

c) a separate class that subclasses unittest.TestCase

d) part of the class you are testing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions