1,760
edits
Changes
no edit summary
<font color='red'>
'''** DO NOT USE - TO BE UPDATED FOR CENTOS 8.0 **'''
</font>
= LAB OBJECTIVES =
* Create new type of objects using the Class construct and investigate different ways in using them.
:In previous labs, you have been advised to make notes and use online references. This also apply to learning about object oriented programming.
:Below is a table with links to useful online Python reference sites (by category)document for Classes and objects. You may find these references useful when performing assignments should study the information given below and make sure you understand the key concepts introduced and labsdiscussed before start working on this lab.
{| class="wikitable" | style="margin-left:20px; border: 2px solid black;"
|- style="background-color:white;border:none;"
| style="border: 2px solid black;" valign="top"|
:Built-in ExceptionsUsing Classes
| style="border: 2px solid black;" valign="top"|
:[https://docs.python.org/3/librarytutorial/exceptionsclasses.html Built-in ExceptionsClasses]
|- style="background-color:white;border:none;"
| style="border: 2px solid black;" valign="top"|
:ListsClasses and Objects
| style="border: 2px solid black;" valign="top"|
:[httpshttp://docsgreenteapress.python.orgcom/3thinkpython2/tutorialhtml/introductionthinkpython2016.html#lists ListsThink Python Chapter 15]
|- style="background-color:white;border:none;"
| style="border: 2px solid black;" valign="top"|
:DictionariesClasses and functions
| style="border: 2px solid black;" valign="top"|
:[httpshttp://docsgreenteapress.python.orgcom/3thinkpython2/tutorialhtml/datastructuresthinkpython2017.html#dictionaries DictionariesThink Python Chapter 16]
|- style="background-color:white;border:none;"
| style="border: 2px solid black;" valign="top"|
:Using Classesand methods
| style="border: 2px solid black;" valign="top"|
:[httpshttp://docsgreenteapress.python.orgcom/3thinkpython2/tutorialhtml/classesthinkpython2018.html ClassesThink Python Chapter 17]
|}
== Key Concepts related to Python Class and Object ==
* Programmer-defined types
* Class Object
* Class methods: __init__, __str__, etc
* Class instance: attributes and methods
* Object instantiation
* Object Attributes
* Pure Function
* Scopes and Namespaces: local, nonlocal, and global
* Class definition syntax
* Class and Instance variables
* Iterators and Generators
* Operator overloading
= INVESTIGATION 1: Creating Classes =