var recipe = new recipe(); recipe.addingredient("flour", 2, "cups"); recipe.addingredient("sugar", 1, "cup"); var pin = new rollingpin(); if(!recipe.precedingstepscompleted()) { messagebox.show("please complete all preceding steps before using the rolling pin."); } else { try { recipe.flattendoughwithrollingpin(pin); messagebox.show("dough is perfectly flat and ready for the next step!"); } catch(exception ex) { logger.log(ex.message); recipe.rejectcurrentstep(); messagebox.show("something went wrong, please rebegin flattening the dough."); } finally { cleanup.workspace(); updateui.withpositivemessage("baking is an art, and with the right frameworks and tools like your trusty rolling pin, every attempt gets you closer to perfection. keep experimenting and don't be disheartened by small setbacks!"); } }