Category Archives: Design

Java : A Parser modelling!

This need to implemented further. Advertisements

Posted in Design, Java | Leave a comment

Java Submission to interfaces!!!

A common currency operation and exchange taken from a book : a demonstration in dummy code (50$ + 100INR -30 EURO) convert to EURO Solution : Convert currency operation and exchange to one interface

Posted in Design, Java | Tagged , | 1 Comment

Strategy pattern with a game of Cards

I have to design a game of Cards .This game has multiple flavours (like real card games where each game of cards has their own rule ) .Here I have two flavours with these rules – Rule for flavour A- … Continue reading

Posted in Design | Leave a comment

Design : putting domain constraint at right place

A common question arises where to put Domain constraints ? Of course in domain object but where ? Most suitable place is constructor .Suppose I have a square grid – a position in grid is represented by x,y  – lower left … Continue reading

Posted in Design | Leave a comment

Why use IoC

Lets see one example where code (caller has complete control over callee) has complete control against the philosophy of  IoC – Here above code has complete control on the flow of code.It knows it is calling getAllNonIoCProgrammers() method from Concrete … Continue reading

Posted in Design | Tagged | 4 Comments