Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Fix the smelly code

Form groups of about 3 people and review Pub.java in nerdschool.bar. Which code smells can you find? Refactor to remove smell(s). There is a small test suite (nerdschool.bar.PubPricesTest.java) that will help you along the way. Introduce more tests if you need them.

You will learn to:

  • Identify bad code
  • Fix code smells
  • Refactor with tests

Required software and tools for this exercise

Details

✏️ Open pom.xml in IntelliJ by selecting Import project from the Welcome Screen. You can also use File --> New --> Project from existing sources.

✏️ Run all the tests and examine the code.

❓ What does this code do? Before you start changing the code, understand what the code does.

✏️ Refactor the code step by step so that it becomes more readable. Introduce more tests if you need them.