Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Lesson 3 (Classes & Objects)

Sally Steuterman edited this page Jul 28, 2020 · 1 revision

Lesson 3: Classes and Objects

In the prep work this week, the students learned:

  1. What a class is in C# and how instantiating classes creates objects.
  2. The difference between fields and methods.
  3. What access modifiers are and how modifiers can be used to encapsulate data.
  4. What the Single Responsibility Principle is and why we should make our classes responsible for one thing.

Announcements

  1. Class 4 prep work should be active by the end of class.
  2. Graded Assignment #1 is due soon!
  3. Graded Assignment #2 opens soon! Remember to get started with graded assignments as soon as possible and read through all of the directions before starting!
  4. Check with your course manager for any additional announcements.

Large Group Time (Instructor)

Lesson 3 Topics That Require Careful Attention

  1. The differences between classes and objects can be confusing for some students.
  2. Object-oriented Programming, encapsulation, and the Single Responsibility Principle can all be very confusing and hard for students to envision.
    1. Take time to review examples that follow these principles and ones that do not.
    2. Taking time to review can be helpful for students who are struggling to understand the impact that following OOP can have on class design.
    3. This is also a good segue into the studio.
  3. When demonstrating code, be sure to highlight auto-implemented properties! Using this feature can be tricky, but once students master it, coding classes in C# becomes a bit more efficient!

Lesson 3 Studio TF Notes

  1. Pace the studio carefully. Students will start by designing their own classes, but also need ample time to share their class design with their partners.
  2. If the group is an odd number, either pair with the student who doesn't have a partner or make one group a group of 3.
  3. This studio can be very subjective. Encourage students who are not following the principles of OOP to think about the reading and see if they can better encapsulate their data.
  4. No matter if their design is perfect, they will need some time at the end to code their designs. The important part here is to make sure their code matches their design, not that their code perfectly matches what you think it should be.