I’m still not really sure what misconception lead to this class:
public class StatusBar {
private JTextField status;
public void setStatus (String status) {
this.status.setText(status);
}
public void clearStatus () {
this.status.setText("");
}
public JTextField getStatus () {
return this.status;
}
}
I can’t comprehend why they didn’t just extend
JTextField to add their methods instead of doing this weird wrapping. This violation of encapsulation principles really hurts somehow.
Posted by torturedtutor 
Not much time
February 5, 2010I just found this within a sourcecode comment a student team handed in:
I’m not really sure, if I should look into the sourcecode at all or just take their own assessment…
Addition:
I should have taken their remark for real…they actually did nothing except extracting anonymous classes into explicit ones…