Title The Class for Representing a TV (Case 2)
Catalog Type SLCItem
Persistent ID https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/objects_classes_tv__664e424a91363872f0ba36b1?index=1
Platform Name PCEX
Features
Description Construct a class that represents a TV. The class should contain data that represents the TV's state (power on or off, current volume level). The state of the TV could be accessed or changed only through the getter and setter methods. The class should also include methods to change the state of the TV (turn on/off, change volume level). Assume that the volume level is an integer and ranges from 1 to 7 (both inclusive).
Keywords
Author Mohammad Hassany
Institution University of Pittsburgh
Iframe URL https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/objects_classes_tv__664e424a91363872f0ba36b1?index=1
Protocol SPLICE
Protocol URL
License MIT
Programming Language PYTHON
Natural Language en

Preview

SPLICE Output