Demonstrate Multilevel Device Inheritance
Design and code a three-level device hierarchy,then explain nonvirtual multiple-base construction order.
Demonstrate multilevel inheritance with a coherent three-level single-inheritance chain and working C++ code or precise executable pseudocode. Distinguish this chain from a class with several direct bases.
For this exercise,assume a device-configuration client constructs the most-specialized type,reads its original label,controls Boolean power and configures an integer delay. A missing,empty or whitespace-only label is rejected before a usable object exists; a valid label is preserved exactly and cannot be changed.
Initially power is off and delay is 60 seconds. Valid delay is 1 through 3600 seconds. A rejected delay update changes nothing; valid power and delay changes are independent. Queries expose read-only observations.
Choose cohesive responsibilities and explain which capabilities are available through each ancestor view of the same object.
Design the objects,contracts and a trace,then implement and test the bounded hierarchy. For this exercise,assume C++17,one caller and configuration only;actual countdown scheduling,hardware,persistence and concurrency are outside scope. The chosen device domain and numeric rules are practice assumptions.
For a separate follow-up,explain whether base declaration order matters when a C++ class has independent nonvirtual direct bases A and B. Contrast class base-list order with constructor initializer-list order,and give a construction/destruction trace. This is a verbal extension,not a second implementation task.