
Outline the course scope and goals and introduce object oriented programming fundamentals. Build your class, learn constructors, properties, namespaces, static fields, static classes, and begin the Warrior Wars project.
Explore how object oriented programming organizes code around objects and classes, using properties and nested objects. Appreciate how this approach enhances code maintenance and future extension.
Create a point class with x and y integer properties using the class keyword, define public properties, instantiate the class with new, and assign values to X and Y.
Organize your C# project by moving a class to its file inside a points and lines folder, and assign a namespace to reflect the folder, then access it with using.
Learn how constructors initialize objects in object oriented programming by using default and parameterized constructors, assigning arguments to properties, and creating objects with or without values.
Explore how the this keyword resolves name conflicts by distinguishing class fields from constructor arguments, enabling precise assignment and optional usage based on coding style and syntactic sugar.
Learn how fields are private and exposed via public properties with getters and setters, using PascalCase property names, camelCase fields, and the value keyword for validation and encapsulation.
Implement a username and password property in a C# class, adding validation logic that enforces a 4–10 character username and numeric passwords, while hiding fields.
Explore read-only, write-only, and read-write properties in C#, using getters and setters to control access, including constructor-based initialization for hidden fields like password.
Learn how static fields can be accessed without an instance, share data across all instances, and auto-increment a public static id in the constructor to track user instances.
Learn how const and readonly differ in C#, with examples of IDs and a height constant of 108, and adopt naming conventions like all caps with underscores for constants.
Use enumerations to define a predefined set of options in C# and prevent input errors. Create a race enum (Earthling, Martian) to drive logic safely.
Explore static classes in C# that provide utility methods without instantiation, with a static write line example and a note on the singleton pattern.
Create a simple project to practice object-oriented concepts learned so far, building a two-warrior game where a good guy and a bad guy fight until defeat with random turns.
Define a warrior class with name, health, isDead, weapon, armor, and faction (good or bad), plus starting health per side, within a namespace using separate weapon and armor types.
Define private fields for weapon and armor, expose read-only properties for damage and life, organize types with enums and namespaces, and prepare constructors to initialize equipment objects.
Design a warrior class in C# by implementing a constructor, using this for disambiguation, and initializing name, life, weapon, armor, and health via a good and bad faction switch.
Define starting values as constants and readonly fields in a warrior class, using private underscore-named fields for health, weapon, armor, and faction, set in the constructor to prevent external changes.
Create two warriors and implement an attack method that targets an enemy, calculates weapon damage against armor, and reduces health until one dies in a simple loop.
Print attack results to the console, showing who attacked whom and the damage, with colored output, and refactor into a static helper that handles the result logic.
This course will lay the foundations of Object Oriented Programming (OOP) in your mind, allowing you to progress to more complex, systematic and cleaner Programming methods.
The course is aimed at students who have at least some coding experience, preferably with C# (but Java or any other similar language is also acceptable).
In the course you will learn:
At the end, we will create a project to practice everything that we have learned in the course, by using a clean and systematic way.
We are going to ask ourselves a series of questions and we will answer them with code, this will produce a beautifully written high quality code, that you will fall in love with.