Second Practicum: Wednesday, April 8th
- Start Time: 9:00 a.m.
- End Time: 9:50 a.m. (a 50 minute grace period is allowed for handling remote online technical difficulties and/or special time accommodations. Please email me if you use the grace period, and why.
- Location: Online -- D2L Quiz (see menu at top of page)
- The exam will emphasize (1) Files, (2) Dictionaries and (3) Object Oriented Programming, and (Numpy). The assignments and active learning exercises should help reinforce your understanding.
- To answer a question, you might need to build on knowledge that you learned previously.
- You may use your notes, previous programs, Python and IDLE -- just no communication with anyone else durning the exam.
- To be successful on the exam, strive to understand the Python material and be able to use it to solve small problems.
Object Oriented Terminology
- Class
- Object (or Instance)
- Method
- Special Methods: Constructor, Reader Method, Writer Method
- More Special Methods: __str__, __add__
- Instance Variable (or State Variable)
- Encapsulation
- Inheritance
- Polymorphism
Object Oriented Problem Example
We can represent a rectangle by knowing three things: the location of its lower left corner, its width, and its height. Create a class definition for a Rectangle class using this idea. The following statement should create a Rectangle object at location (4,5) with width 6 and height 5:
r = Rectangle(Point(4, 5), 6, 5)
Object Oriented Problem Example
Supply the missing class in oop.py such that the following output is produced when the program is run:
Montana State beat Idaho State on 3/11/2017: 62 to 56
Washington beat Montana State on 3/18/2018: 91 to 63