Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 873 Bytes

File metadata and controls

23 lines (17 loc) · 873 Bytes

SimpleMachine

This simple machine was built to demonstrate class hierarchy and inheritance in OOP (in this case Python).

PROMPT: Construct a simple machine that when online can be powered on and off by clicking a button. If the machine is powered off, then the user will be notified via a pop up alert message and a log file will be updated with the date and time the machine was shutdown.

SPECIAL REQUIRMENT: The Function call for pressing the button cannot be modified for future Implementations such as modifying or creating new classes, thus we will need to loop through a list of class instances, which will be dynamically passed in and executed upon each call of the button function.

SETUP: In order to run this program you will need Python installed on your machine (version 2 or 3). You will also need to install pip for the alert message to work properly.