Discuss the ways in which inheritance promotes software reuse, saves time during program development and helps prevent errors.
What will be an ideal response?
Inheritance allows developers to create subclasses that reuse code declared already in a superclass. Avoiding the duplication of common functionality between several classes by building a class inheritance hierarchy can save developers a considerable amount of time. Similarly, placing common functionality in a single superclass, rather than duplicating the code in multiple unrelated classes, helps prevent the same errors from appearing in multiple source-code files. If errors occur in the common functionality of the superclass, the software developer needs to modify only the superclass’s.
You might also like to view...
A _________________ is a smooth blending of shades from one color to another.
a. transition b. transform c. shadow d. gradient
(Bubble Sort Enhancements) The bubble sort described in Exercise 6.11 is inefficient for large arrays. Make the following simple modifications to improve the performance of the bubble sort:
a) After the first pass, the largest number is guaranteed to be in the highest-numbered element of the array; after the second pass, the two highest numbers are “in place,” and so on. Instead of making nine comparisons on every pass, modify the bubble sort to make eight comparisons on the second pass, seven on the third pass, and so on. b) The data in the array may already be in the proper order or near-proper order, so why make nine passes if fewer will suffice? Modify the sort to check at the end of each pass if any swaps have been made. If none have been made, then the data must already be in the proper order, so the program should terminate. If swaps have been made, then at least one more pass is needed.
LinkedIn is used primarily by ________
A) students B) educators C) parents D) business professionals
The Goal Seek command can be found on the DATA tab, in the Get External Data group
Indicate whether the statement is true or false