01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

You’ll need to<br />

put the pieces<br />

together to<br />

describe the<br />

order...<br />

...and then pass<br />

it on to the<br />

order processor<br />

and make sure<br />

it worked.<br />

Red<br />

Below is a new test method. Implement a test that will verify your<br />

s<strong>of</strong>tware can process a simple order.<br />

// other tests<br />

@Test<br />

public void testSimpleOrder() {<br />

OrderProcessor orderProcessor = new OrderProcessor();<br />

OrderInformation<br />

- customerName : String<br />

- drinkDescription : String<br />

- giftCardNumber : int<br />

- preferredStoreNumber : int<br />

}<br />

+ setCustomerName(name : String)<br />

+ setDrinkDescription(desc : String)<br />

+ setGiftCardNumber(gcNum : int)<br />

+ setPreferredStoreNumber(num : int)<br />

+ getCustomerName() : String<br />

+ getDrinkDescription() : String<br />

+ getGiftCardNumber() : int<br />

+ getPreferredStoreNumber() : int<br />

Receipt<br />

- confirmationNumber : int<br />

- pickupTime : Date<br />

- gcBalance : BigDecimal<br />

+ setConfirmationNumber(no : int)<br />

+ setPickupTime(date : Date)<br />

+ setGCBalance(bal : BigDecimal)<br />

+ getConfirmationNumber() : int<br />

+ getPickupTime() : Date<br />

+ getGCBalance() : BigDecimal<br />

Download at WoweBook.Com<br />

test-driven development<br />

Don’t forget about your<br />

classes from the last task.<br />

GiftCard<br />

- activationDate : Date<br />

- expirationDate : Date<br />

- balance : BigDecimal<br />

+ getActivationDate() : Date<br />

+ getExpirationDate() : Date<br />

+ getBalance() : BigDecimal<br />

+ setBalance(BigDecimal) : void<br />

+ equals(object : Object) : boolean<br />

you are here 4 291

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!