...
suppose your are creating a module that needs to have access to patient information. Assuming that the class is called Patient.
The following code can be used a pojo of a class patient
public class Patient{
//These can also be called attributes
public String FirstName;
public String LastName;
public integer Age;
//getters and setters method
public String getFirstName(){
return FirstName;
}
public String getLastName(){
return LastName;
}
public Integer Age(){
return age;
}
}
Note forgetting setters methods and also creating constructor methods. Most IDEs help us in getting things done without wasting much time . Am using eclipse IDE , so you open your class(patient class in this case)→ right click→ source→Generate getters and setters method. you can continue and provide constructor or to String method depending o n your needs.(Model handles the bussiness logic of the application)
...