Skip to content

Instantly share code, notes, and snippets.

@Zeegaths
Created February 9, 2024 15:13
Show Gist options
  • Save Zeegaths/f63b37a034ca6374b945234a9cc8c89b to your computer and use it in GitHub Desktop.
Save Zeegaths/f63b37a034ca6374b945234a9cc8c89b to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./School.sol";
contract SchoolFactory {
School public schoolSystem;
constructor() {
schoolSystem = new School();
}
function registerStudent (address _studentAddress, string memory _name, uint _age, uint _score) public {
schoolSystem.registerStudent(_studentAddress, _name, _age, _score);
}
function registerTeacher (address _teacherAddress, string memory _name, uint _age, uint _Score) public {
schoolSystem.registerTeacher(_teacherAddress, _name, _age, _Score);
}
function updateScore(address _studentAddress, uint sscore) public {
schoolSystem.updateScore(_studentAddress, sscore);
}
function removeTeacher( address _teacherAddress) public {
schoolSystem.removeTeacher(_teacherAddress);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment