Blog Archives
1 2

01: Can you design classes & interfaces using OO?

Q1. How would you go about designing a “farm animals” application where animals like cow, pig, horse, etc move from a barn to pasture, a stable to paddock, etc? The solution should also cater for extension into other types of animals like circus animals, wild animals, etc in the future....



01: Q13 “12 Rules” for REST API design & development

These are more like rules to develop RESTFul web services as opposed to being the best practices. REST is an architectural style without any contracts or specifications. So, it is imperative to apply the following rules for better REST API design. #1. Write stateless RESTFul services This means each request...



02: Scenarios based Java OO concepts & GoF design patterns – naive Template Method pattern

Scenarios based Java OO concepts & GoF design patterns



03: Scenarios based Java OO concepts & GoF design patterns – Strategy Pattern

The following post improves on the design flaws listed in the previous post entitled 02: Scenarios based Java OO design & GoF design patterns – naive Template Method pattern. Scenario: A company named XYZ Retail is in the business of selling Books, … Read more ›...



05: Q19-Q24 How to create a well designed Java application?

A software application is built by coupling various classes, modules, and components. Without coupling, you can’t build a software system. But, the software applications are always subject to changes and enhancements. So, you need to build your applications such a way that they can not only adapt to growing requirements,...



06: Q25 – Q32 Design principles interview questions & answers for Java developers

Design principles interview questions & answers for Java developers so that you can expand your OOP skills to design robust Java apps Q25. What are the SOLID design principles? A25. SOLID is an abbreviation for 5 design principles. SRP (Single Responsibility Principle) If you have a class with calculation logic,...



6 tips to go about writing loosely coupled Java applications

6 tips to go about writing loosely coupled Java applications useful not only for talking the talk in Java job interviews, but also to build maintainable Java applications. Loose coupling in microservice architecture means microservices should know little about each other, and any change to one service should not affect the others.

Read more ›



Class invariant & designing by contract in Java

Q1. What is a class invariant? A1. Class invariant is — what must be true about each instance of a class? If an invariant fails then there could be a bug in either calling-method or called-method. It is convenient to put all the expressions required for checking invariants into reusable...



How would you go about designing with UML diagrams

This extends 12 UML Interview Questions & Answers. Q1. How would you go about designing a system as described below? A barn that contains animals such as cows and horses. A farmer milks the cows in the farm, and the animals eat hay that are stored in the barn. …...



Part 1: Badly designed Java classes & interfaces

4 Part practical design concept series Part 1: Abstraction | Part 2: Single Responsibility Principle | Part 3: Open Close Principle | Part 4: Dependency Inversion Principle. … Read more ›...



1 2

800+ Java Interview Q&As

Java & Big Data Tutorials

Top