a- suppose a lamp is described Lamp is described by its color and whether it is turned on write class Lamp that contains
Posted: Sun Jul 03, 2022 11:23 am
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.