Home CPSC 330

Refactoring Exercise


To get experience refactoring code.


For this lab, you will refactor a badly written program, while not changing the way the program works.

This program, RPN.java is a Reverse-Polish Notation calculator which uses a stack. It is messy in several different ways. You will refactor this code using at least three of the rules discussed in class.

You should also fix the indentation of the code. This can be done with "gg=G" in Vim.


When your program is done, email the code to ifinlay@umw.edu.

Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.