Posts

Showing posts from 2018

C# Object Oriented Programming

Image
Object Oriented Programming Last Revision: 12th September 2018 Object Oriented Programming is a brand new(ish) way to program your project. Notice the word Object Oriented  is used in the title. We create blocks ( Objects ) inside a Class , which can be re-used at any point of the program! Let's get cracking! Let's say a business wanted you to create a program for them, they want to hold data on Games. They want you to make a program which helps them to organise their games for them. Let's go! Step 1: Planning Whenever you start a project, it's probably best to plan out how your program will work. This will (Hopefully) reduce work time as you already know what to implement. Let's go through some techniques: Abstraction Abstraction is an OOP technique which restricts what you see and what the class sees. For example let's look at a UML Diagram: Without Abstraction, the crazy client is able to program the same actions and functions as th...

C# Tutorial - Iteration Statements

Image
C# Tutorial - Iteration Statements Last Revision: 12th September 2018 Iterations helps the process of going through multiple variations of large or small collection groups (Arrays, Lists etc) Today I'll be explaining through 4 iterations with their benefits: Do ... While Loop For Loop For each Loop While Loop When do I use Iteration loops in my program? It's best to use an iteration loop when you need to process variables that contain indexes or a range. Here is example of both: Iteration 1 - Do While Loop & While Loop The Do While Loop acts differently to its partner in crime, the While Loop. The Do While Loop does the execution then the validation as the While Loop does the validation then the execution. Here is a few code samples: These two Iterations produces the following outputs: DoWhileInt Number: 1 DoWhileInt Number: 2 DoWhileInt Number: 3 DoWhileInt Number: 4 DoWhileInt Number: 5 DoWhileInt Number: 6 DoWhi...