Created
February 9, 2024 15:13
-
-
Save Zeegaths/f63b37a034ca6374b945234a9cc8c89b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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