Grokking the Object Oriented Design Interview
Vote

0% completed

What This Course Covers

What you can do when you finish

The four chapters

What is inside a case study

Who this course is for

What you need to know already

What this course does not do

Key Takeaways

You will be asked to design one application, in front of someone, in about forty five minutes. Not the servers it runs on. The classes inside it. A parking lot. A vending machine. A chess game. Splitwise.

Most engineers write classes every week and still find this round hard. The reason is that the interview asks for something the job rarely asks you to say out loud. Name the classes. Say what each one is responsible for, in one sentence. Then defend how they connect.

This course teaches that, and then makes you practise it twenty two times.

What you can do when you finish

  • Turn one sentence of instruction into a list of requirements with a clear boundary.
  • Name the classes a design needs, and give each one a single responsibility.
  • Choose the right relationship between two classes, and draw it correctly.
  • Write the two or three methods that perform the main flows, in your language.
  • Say which design pattern you used, and which one you rejected.

The four chapters

Image

Chapter 1, Introduction. This one. It tells you what the round is, and shows you a complete answer before any theory. It also explains how a case study lesson is built, and gives you a study plan for the time you have.

Chapter 2, Object oriented design and UML. The notation. UML is the standard set of symbols for drawing a design. It covers class diagrams, use case diagrams, activity diagrams and sequence diagrams. The chapter starts at the beginning, so it does not matter if you have never drawn one.

Chapter 3, How to answer an object oriented design question. The method. Five steps that turn one sentence into working code. The chapter also covers two ways to check a design after you have drawn it. Those are the SOLID principles, and the small set of design patterns used in this round.

Chapter 4, Object oriented design case studies. Twenty two questions, ordered from the easiest to the hardest. These are the questions companies ask, worked from the first sentence to running code.

There is also a short appendix at the end with contact details and the other courses.

What is inside a case study

Every case study is built the same way, so after the first one you always know what comes next.

  • The question, and the requirements we chose to design against.
  • The actors and their use cases, drawn as a use case diagram.
  • The class diagram, revealed in stages rather than all at once, so you can follow the reasoning instead of studying a finished picture.
  • Activity diagrams for the most important flows.
  • Working code in Python, Java and C++. The three versions print exactly the same output, so you only ever read one of them.
  • The design patterns the answer uses, named, where the answer uses one.
  • A section called "What we left out", which lists the simplifications we made and what to say when the interviewer notices them.

Who this course is for

  • You have an interview scheduled, and this round is part of it.
  • You write object oriented code every day, but you have never had to defend a class diagram out loud.
  • You prepared for the system design interview and found out that this is a different round with different rules.

It is also useful outside interviews. The five step method is how you divide a new feature into classes at work, when nobody has decided its design yet.

What you need to know already

One object oriented language, at a level where you can read a class with a constructor and three methods. That is the whole prerequisite. Every code sample appears in Python, Java and C++, so you read the one you would use in the interview and ignore the others.

You do not need to know UML. Chapter 2 teaches it from the beginning.

You do not need the system design interview. That round asks how a product survives millions of users, and it talks about servers, databases, caches and queues. This round stays inside one application and talks about classes, fields, methods and relationships. Preparing for one does not prepare you for the other.

What this course does not do

It does not teach you a programming language. It assumes you have one already.

It does not cover data structures and algorithms. That is a separate round with separate preparation.

It does not give you a script to memorise. Memorising twenty two answers does not help you with the twenty third question. The method is the part you can reuse.

Key Takeaways

  • This round asks you to design the classes inside one application, in about forty five minutes.
  • The course has four chapters: this introduction, the UML notation, the five step method, and twenty two worked case studies.
  • Every case study includes a staged class diagram, activity diagrams, and identical code in Python, Java and C++.
  • The only prerequisite is one object oriented language. UML and system design are not assumed.
  • The method works on questions you have never seen. Memorised answers do not.

The fastest way to understand this round is to see a finished answer before you learn any of the theory. The next lesson does exactly that, with a design small enough to fit on one screen.

On This Page

What you can do when you finish

The four chapters

What is inside a case study

Who this course is for

What you need to know already

What this course does not do

Key Takeaways