@ekamjotsingh.ek/energy-management-system
Version:
A smart campus energy management system
34 lines (29 loc) • 812 B
text/typescript
/**
* Class representing a staff member.
*/
class Staff {
staffID: string;
name: string;
/**
* Create a Staff instance.
* @param staffID - Unique identifier for the staff member.
* @param name - Name of the staff member.
*/
constructor(staffID: string, name: string) {
this.staffID = staffID;
this.name = name;
}
/**
* Simulate viewing personal energy usage.
*/
viewPersonalUsage(): void {
console.log(`Staff ${this.name} is viewing personal energy usage.`);
}
/**
* Simulate participating in energy-saving programs.
*/
participateInPrograms(): void {
console.log(`Staff ${this.name} is participating in energy-saving programs.`);
}
}
export default Staff;