UNPKG

@ekamjotsingh.ek/energy-management-system

Version:
16 lines (15 loc) 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // Class to represent a data point in the system class DataPoint { constructor(dataPointID, timestamp, energyUsage) { this.dataPointID = dataPointID; this.timestamp = timestamp; this.energyUsage = energyUsage; } // Simulate viewing data point information viewData() { console.log(`DataPoint ${this.dataPointID} at ${this.timestamp.toISOString()}: ${this.energyUsage} kWh.`); } } exports.default = DataPoint;