cforster / theme-park-project

An assignment about theme park queues
0 stars 11 forks source link

Why is it that when you create a new customer 'c,' we create a new Customer(this)? Why do we need the "this?" #17

Closed sunainadanziger closed 10 years ago

maguerosinclair commented 10 years ago

I have this question as well.

cforster commented 10 years ago

this refers to the class that you are currently in. So in this program, it refers to park. so when you make a new customer, you give "park" to that customer. when you do a tick for the ride, it gets the time from park.

if you look at the most recent version of the code, it no longer does that. Mattori refactored that out as bad style in #6