A QR code can contains arbitrary text, so you can implement a toString/fromString serializer/desserializer in your Student class.
A QRCode can contains up to 4296 alpha-numeric chars (be careful with this limit)
A suggestion : you can use Json format since there a lot of libraries available to help you in serialization/desserialization process.
If you decide to use Json : you can use the gson library.
Serialization is as simple as calling
public String serialize(){
return new Gson().toJson(this);
}
And for deserialization,
public static Student deserialize(String jsonString){
new Gson().fromJson(jsonStr, Student.class);
}
more about Json on Android here