CSE 201 Lecture Notes - Lecture 12: Gift Card, Simplicity, Junit

22 views3 pages

Document Summary

Cse 201 - lecture 12 - test driven development. Ex) adding gift card functionality to starbuzz website for orders. Order information: customer"s name, drink description, store #, gift card #. Gift card information: activation date, expiration date, balance. Receipt information: confirmation number, pickup time, remaining balance on card, purchase cost. Writing each line of code specifically as response to tests. Our first test is for representing order information. Smallest test we could write? (think basic) Keep it simple and just create new orderinformation object. However this doesn"t compile yet because we are using class names that don"t exist yet. We want tests to fail when we first write them. In our example, that will include orderinformation object. Now it"s clear that we have to create the class to pass the test. Fail first and code later: before going further by writing more tests or working on the task, write the simplest code to get the test to compile.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents