Problem Statement:
Write a contract named "AttendanceRegister" which will be deployed by teacher. There will be a function add which will take student name, class & joiningDate and will store it where:
Name : String to store student name
Class : Number from 1 to 12
Joining Date : Date timestamp of student joining day
Each student will be stored corresponding to a unique serial number called roll number.
Only teacher can add the data of student. An event will be emitted on success.
Use struct, modifier & mapping wherever applicable.
Standard: 2 Sequence: 5 Contract Name: AttendanceRegister
Problem Statement: Write a contract named "AttendanceRegister" which will be deployed by teacher. There will be a function
add
which will take studentname
,class
&joiningDate
and will store it where:Each student will be stored corresponding to a unique serial number called roll number.
Only teacher can add the data of student. An event will be emitted on success.
Use
struct
,modifier
&mapping
wherever applicable.Add related hint, if required.