Python Course Design Note 18 of 52

Classes and Objects

Chapter11

Task Name - Classes and Objects

Task Overview

  1. Understand the concept of object-oriented programming
  2. Understand what happens when a class is defined and when an object is created

Community Topic

Why does object-oriented programming in Python improve efficiency?

Details

Object-oriented programming calls for a god’s-eye way of thinking

Check-in Requirements

  1. What is object-oriented programming?
  2. Should every program be designed in an object-oriented way? Why?
  3. What is an object? What is a class?
  4. In procedural programming, when we think about a solution, we analyze which steps are needed to complete the task and in what order to write them; in object-oriented programming we shift from being the operator to being the commander. What do we think about first?
  5. A class usually contains variables and functions. What does each of them describe?
  6. What happens when a class is defined? What happens when an object is created?
  7. Programming exercise:
Student grade management system
		1. View all of a student's grades by name
		2. View everyone's grades in a given subject
		3. View the overall average score
		4. View a given student's grade in a given subject
		5. Delete a student's information by name

Enhanced version requirements (optional) 
		1. First write a data file in JSON format  whose content is the students
		2. Parse the JSON data, convert it into student objects, and then perform create, delete, update and query operations