[Uw-ruby] week 5 homework

Carol Morgan carol-morgan at hotmail.com
Sun Nov 4 09:44:12 PST 2007


Ryan,,
I won't be in class on Wednesday. I have a family emergency to tend to. I'm assuming that week 6 homework will be posted.
 
-Carol> To: uw-ruby at zenspider.com> From: ryand-uwruby at zenspider.com> Date: Fri, 2 Nov 2007 14:27:46 -0400> Subject: [Uw-ruby] week 5 homework> > I'll also be posting this to the website as soon as I get real > internet access (I'm at the airport):> > ##> # Week 5 Homework> > ##> # Bank> #> # Must be able to:> #> # * Make new accounts.> # * Close accounts.> # * Make deposits for a specific account.> # * Make withdrawls for a specific account.> #> # How you do it is entirely up to you.> > ##> # Vending Machine> #> # Must be able to:> #> # * Hold multiple products with differing prices.> # * Know when it is out of a specific product.> # * Refill specific products.> # * Sell specific products (and therefor deal with user input and > payments)> > ##> # Parking Lot> #> # Must be able to:> #> # * Open close gate/bar thingy> # * Take money for parking spot #> # * Know how long the car can be there and mark it for fine if past time> # * whatever... we didn't talk about this, so be creative.> > ---- test/test_bank.rb> > #!/usr/bin/env ruby -w> > ##> # Student Name: XXX> # Homework Week: 5> #> > $: << 'lib' # this is only needed if you don't use autotest> require 'test/unit'> require 'bank.rb'> > ##> # NOTE: these tests are just hints, go nuts with them and/or the > design...> > class TestBank < Test::Unit::TestCase> def setup> @bank = Bank.new> end> > def test_create_account> flunk "write me"> end> > def test_deposit_to_acct> flunk "write me"> end> > def test_deposit_to_acct_unknown_person> flunk "write me"> end> > def test_withdraw_known_person> flunk "write me"> end> > def test_withdraw_known_person_overdraw> flunk "write me"> end> > def test_withdraw_unknown_person> flunk "write me"> end> end> > ----- test/test_account.rb> > #!/usr/bin/env ruby -w> > $: << 'lib' # this is only needed if you don't use autotest> require 'test/unit'> require 'account.rb'> > class TestAccount < Test::Unit::TestCase> def setup> @account = Account.new "Money Penny"> end> > def test_deposit> flunk "write me"> end> > def test_withdraw> flunk "write me"> end> > # have fun and good luck...> end> > _______________________________________________> Uw-ruby mailing list> Uw-ruby at zenspider.com> http://www.zenspider.com/mailman/listinfo/uw-ruby
_________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.zenspider.com/pipermail/uw-ruby/attachments/20071104/e4c5aff6/attachment.html


More information about the Uw-ruby mailing list