dimanche 1 février 2015

Java single tone design pattern vs global variable

I have developed the "Quiz application in java", which have many features like quiz conduction, instant reporting features, student can post there doubts and all.


I want to maintain the log of number of student requested for quiz, number of student submitted the response, total student active and some more details.


I am using a global class which have static variables to keep these details. Is it correct way to maintain this or should i want to use Single Tone Design pattern ?


Kindly give me pros and cons of the both and which one to use when?


Aucun commentaire:

Enregistrer un commentaire