How are real-life examples of inheritance similar to object-oriented programming inheritance?
What will be an ideal response?
You might choose plants and animals based on inheritance. You plant impatiens next to your house because of your shady street location; you adopt a Doberman Pinscher because you need a watchdog. Every individual plant and pet has slightly different characteristics; but within a species, you can count on many consistent inherited attributes and behaviors. Similarly, the classes you create in object-oriented programming languages can inherit data and methods from existing classes. When you create a class by making it inherit from another class, you are provided with data fields and methods automatically.
You might also like to view...
If you have a computer with three hard disks, what type of RAID fault-tolerant configuration will make best use of them?
A. RAID 0 B. RAID 1 C. RAID 5 D. RAID 10
Which of the following is NOT true about securing data?
A. Use an alias when communicating on a blog or social network. B. The security and privacy of personal information on the Internet is getting worse all the time. C. Verify that you log off a computer used in a public place such as a library. D. All of the above are true.
To create a digital signature, a sender first takes the original plaintext message and runs it through a_______, which is a mathematical calculation that gives the message a_______.
a) key function, key value. b) signature function, signature value. c) hash function, hash value. d) None of the above.
Which of the following devices is the computer hardware that records and/or retrieves items to and from a flash drive or external hard drive, for example?
A. concatenation B. indexed C. resolved D. storage