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