- A Suppose A Lamp Is Described Lamp Is Described By Its Color And Whether It Is Turned On Write Class Lamp That Contains 1 (68.49 KiB) Viewed 8 times
a- suppose a lamp is described Lamp is described by its color and whether it is turned on write class Lamp that contains
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
a- suppose a lamp is described Lamp is described by its color and whether it is turned on write class Lamp that contains
a- suppose a lamp is described Lamp is described by its color and whether it is turned on write class Lamp that contains: or not. • A constructor that creats an object with initial values for color and whether the lamp is on or off. • A print method to print lamp. info with spaces between them, Implement the en capsulation principle. b-write a testing class that runs creates of 2 Lamp objects and then run the point print method on the elements of an array the array.