python - oop - Part I

KSATs: A0561, A0725, A0726, A0727, A0728, A0729, K0013, K0024, K0030, K0031, K0032, K0033, K0034, K0035, K0036, K0037, K0038, K0039, K0040, K0195, K0710, K0733, S0026, S0027, S0079, S0080

Measurement: Written, Performance

Lecture Time: 1 Hour

Demo/Performance Time: 2 Hours

Instructional Methods: Informal Lecture & Demonstration/Performance

Multiple Instructor Requirements: 1:8 for Labs

Classification: UNCLASSIFIED

Lesson Objectives:

  • LO 1 Understand how to import modules and module components in Python. (Proficiency Level: C)

    • MSB 1.1 Employ the Python standard library to solve a problem. (Proficiency Level: C)
  • LO 2 Describe how to utilize PIP to install a Python package. (Proficiency Level: B)

  • LO 3 Comprehend Python objects

    • MSB 3.1 Comprehend Python classes
    • MSB 3.2 Differentiate between Python objects and classes
  • LO 4 Explain the Python keyword super

  • LO 5 Explain Python object initialization

  • LO 6 Explain Python object attributes

  • LO 7 Describe polymorphism in Python

  • LO 8 Describe inheritance in Python

  • LO 9 Describe getter and setter functions in Python

  • LO 10 Understand how to implement input validation in Python.

  • LO 11 Understand how to implement exception handling in Python.

  • LO 12 Describe the terms and fundamentals associated with object-orientated programming using Python. (Proficiency Level: C)

    • MSB 12.1 Describe the advantages of object-orientated programming in Python. (Proficiency Level: A)
  • LO 13 Discuss Common Principles of object-oriented programming.

  • LO 14 Discuss Code Styling Considerations of object-orientated programming.

Performance Objectives (Proficiency Level: 3c)

  • Conditions: Given access to (references, tools, etc.):

    • Access to specified remote virtual environment
    • Student Guide and Lab Guide
    • Student Notes
  • Performance/Behavior Tasks:

    • Create, reuse and import modules in Python.
    • Utilize modules in the Python standard library.
    • Install and utilize a Python package via PIP.
    • Write a class in Python
    • Instantiate a Python object
    • Write a class constructor
    • Write object-oriented programs
    • Implement object inheritance.
    • Expand class functionality using getter and setter functions.
    • Use class methods to modify instantiated class objects.
    • Write a program to demonstrate input validation in Python.
    • Write a program to demonstrate exception handling in Python.
  • Standard(s)

    • Criteria: Demonstration: Correctable to 100% in class
    • Evaluation: Students will have 4 hours to complete the timed evaluation consisting of both cognitive and performance components.
    • Minimum passing score is 80%

References

  1. https://docs.python.org/3/library/exceptions.html
  2. https://docs.python.org/3/tutorial/classes.html
  3. https://docs.python.org/3/tutorial/modules.html
  4. https://docs.python.org/3/tutorial/modules.html#packages
  5. https://pip.pypa.io/en/stable/quickstart/
  6. https://realpython.com/python3-object-oriented-programming/
  7. https://wiki.python.org/moin/HandlingExceptions
  8. https://www.w3schools.com/python/python_classes.asp