Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

C# Objects Course

via Treehouse

Overview

In this course we'll build on what you learned in C# Basics. You'll learn about Object Oriented Programming (OOP). We'll use OOP to write the code for a tower defense game. After completing this course, you'll have learned most of the syntax of the C# programming language.

What you'll learn

  • Core Principles of Object Oriented Programming
  • Classes and Objects
  • Method, Properties, and Fields
  • For Loops
  • Arrays
  • Exceptions

Syllabus

Object-Oriented Programming

We'll discuss some of the basics concepts of object oriented programming and exactly what it means to be "object oriented". We'll learn the differences between objects and classes. Then we'll see how to create classes and objects in C#.

Chevron 13 steps
  • Welcome

    1:30

  • Object-Oriented Programming

    2:29

  • Object-Oriented Programming

    5 questions

  • Types

    3:14

  • Instantiation

    6:28

  • Types and Objects

    5 questions

  • Instantiation

    2 objectives

  • Fields

    6:18

  • Fields

    1 objective

  • Object Initialization

    5:14

  • Initialization

    3 objectives

  • Practice Writing Classes

    3:40

  • Wrap-up

    4 questions

Methods

We'll learn about the role that methods play in OO.

Chevron 9 steps
  • Methods

    7:03

  • Methods

    1 objective

  • Return Values

    4:47

  • Statements

    3 questions

  • Static vs Instance Methods

    6:24

  • Documentation

    3 questions

  • Using Static Methods

    5:33

  • Overloading Methods

    1:44

  • Method Overloading

    3 objectives

Inheritance

We'll learn about one of the four core principles of OO: inheritance. We'll also learn how inheritance is used to create and handle custom exceptions.

Chevron 12 steps
  • Inheritance

    3:35

  • Inheritance in Code

    5:27

  • Inheritance

    5 questions

  • Inheritance

    1 objective

  • Throwing Exceptions

    4:49

  • Throwing Exceptions

    1 objective

  • Catching Exceptions

    1 objective

  • Exception Messages

    3:02

  • Custom Exceptions

    6:23

  • Custom Exceptions

    2 objectives

  • Catching Exceptions

    5:02

  • Catching Exceptions

    6 questions

Encapsulation and Arrays

We'll learn about another core principle of OO: encapsulation. We'll also learn all about arrays and put them to use in Treehouse Defense.

Chevron 10 steps
  • Arrays

    5:22

  • Arrays

    4 objectives

  • Encapsulation

    6:39

  • Encapsulation

    3 questions

  • `Index Out of Range

    5:51

  • Arrays

    3 questions

  • Ternary If

    2:53

  • Ternary If

    1 objective

  • Null Reference

    5:33

  • Null

    4 questions

Encapsulation with Properties

We'll learn about properties in C# and use them to provide good encapsulation in Treehouse Defense.

Chevron 16 steps
  • Accessor Methods

    4:33

  • Accessor Methods

    2 objectives

  • Properties

    4:22

  • Properties

    1 objective

  • Auto-Properties

    4:12

  • Auto-Properties

    2 objectives

  • Using Properties

    4:20

  • Using Properties

    1 question

  • Computed Properties

    4:19

  • Computed Properties

    1 objective

  • Expression Bodied Members

    2:52

  • Expression Bodied Members

    2 objectives

  • Property Initial Values

    3:57

  • Property Initial Values

    1 objective

  • Property Practice

    5:16

  • Properties

    4 questions

Loops and Final Touches

We'll finish Treehouse Defense by coding up the logic of the game. In the process we'll learn about more types of loops, constants, and static members.

Chevron 16 steps
  • While Loops

    3:55

  • For Loops

    3:15

  • For Loops

    1 objective

  • Foreach Loops

    4:04

  • Foreach Loops

    1 objective

  • Magic Numbers and Constants

    3:13

  • Constants

    1 objective

  • Putting It All Together

    5:13

  • Commenting

    1:50

  • Commenting Code

    3 questions

  • Playing the Game

    4:59

  • Static Members

    4:39

  • Static Members

    1 objective

  • Using Static Fields

    3:40

  • Wrap Up

    2:30

  • Wrap-up

    2 questions

Related Courses

Reviews

Start your review of C# Objects Course

Never Stop Learning!

Get personalized course recommendations, track subjects and courses with reminders, and more.

Sign up for free