INFO1110 Lecture Notes - Lecture 5: Order Of Merit

15 views1 pages

Document Summary

# no need to create a circle instance to call class method print(circle. get_pi()) # create a circle instance with radius 2 c1 = circle(2) # you can only call this method on instances of circle print(c1. calculate_area()) Both instance methods and class methods can take in additional parameters within their de nitions. Test-driven development (tdd) is about writing tests before you begin implementing your program. Why: tests are written to the speci cation, rather than the implementation, can help you make api design decisions. What methods should the class have: helps you de ne and/or understand the behaviour of the code before you go to implement it.

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