//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f. pragma solidity ^0.7.1; contract ProoF-Of_Attendance{ //A01561804 event studentRegistered(string mat, address studentaddress); address CreatorID; struct Student { string Matricula; address _studentAddress; } Student[] Students; mapping(address => bool[16]) attendance; function RegisterStudent(uint studentNum,address StudentId, string studentMatricula) public { Student student = Student(studentMatricula, StudentID); Students[studentNum] = student; emit studentRegistered(StudenMatricula, StudentID); } function DeleteStudent(uint studentNum) public { delete students[studentNum]; } function RegisterAttendance(address StudentId, string studentMatricula, uint day,bool attended) view public { for (uint i=0; i<Students.length; i++) { if (Students[i]._studentAddress == address StudentId){ attendance(Studentid)[day] = attended; } } } }
0.7.1