CSC207H5 Lecture Notes - Lecture 3: Junit, University Of Toronto Mississauga, Liskov Substitution Principle

46 views5 pages
School
Course
Professor

Document Summary

Lecture 3: oo-programming + inheritance keyword static on variables. Initialized only once, at the start of the execution. Single copy to be shared by all instance of the class. Need to be more under controlled as you can change the variable outside the class. There is too much dependence between the objects; very easy to collapse the entire program. Misconception: takes too much time to write the test suite (test cases) Focuses you to think possible inputs and outputs. Should be written even before the implementation. Framework for writing tests in java; written by erich gamma and kent beck. Each method in unit test are labelled @before, @test and @after ( read more: . @before - some setup/prep work before running tests (eg. open files) @after - clean up after tests finish. Inheritance hierarchy, with class object at the root. All other java classes have one parent. if a class has no parent declared (not extending any class), .

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