OOP Class14

esse quam videri
Revision as of 19:38, 7 June 2019 by Janell (talk | contribs)
Jump to: navigation, search



samples: http://code.msdn.microsoft.com/windowsdesktop/Samples-for-Parallel-b4b76364


int count = 20;
int[] ints = new int[count];
for (int i = 0; i < count; i++)
                    shorts[i] = 1;

//sample Parallel.For
int[] intP = new int[count];
Parallel.For(0, count, i =>
                        intP[i] = 1;






private void buttonBlock_Click(object sender, EventArgs e)
            textBox1.Text =  DoLongCount();

        //Async call to async method
        private async void buttonAsync_Click(object sender, EventArgs e)
            textBox1.Text = await DoLongAsyncCount();

        private string DoLongCount()
            return "count is " + Count;

        //Async Task
        private async Task<string> DoLongAsyncCount()
            await Task.Delay(1000);
            return "count is " + Count;

Final Review

OOP Final Review

  • Be very familiar with c# syntax
    • Basic object types (int, bool, string)
    • Conditional and Branching statements
    • Arrays and Generics ie List
  • Understand Classes and Inheritance.
  • Use some advanced class features such as abstract classes and virtual methods that are overridden
  • Understand class relationships
    • Is A
    • Has A
    • Uses A
  • Understand Encapsulation, Abstraction and Polymorphism
    • Abstraction
Each class should abstract its behavior in order to increase usability, reuse, and organization.
    • Encapsulation
Each class should contain all of the properties and methods it needs. It should only expose what is necessary to outside classes.
    • Polymorphism
many forms, same code interface but interchangeable classes
  • Be able to read and create UML Diagrams
  • Be able to recognize and use simple design patters

The final will be consist of two sections the writtens section and the practical section. The practical section will be open everything excpet open mouth (yes open note open book open web). You will not be ablt to use any of theese resources during the written section.