Оцените презентацию от 1 до 5 баллов!
Тип файла:
ppt / pptx (powerpoint)
Всего слайдов:
28 слайдов
Для класса:
1,2,3,4,5,6,7,8,9,10,11
Размер файла:
586.17 kB
Просмотров:
61
Скачиваний:
0
Автор:
неизвестен
Слайды и текст к этой презентации:
№1 слайд![Interfaces. C Collections.](/documents_6/963c9d24e68a81e16c414ef46064d19b/img0.jpg)
Содержание слайда: Interfaces.
C# Collections.
.Net Core. 2017
№2 слайд![AGENDA Interface declaration](/documents_6/963c9d24e68a81e16c414ef46064d19b/img1.jpg)
Содержание слайда: AGENDA
Interface declaration
Interface implementation
Built-in .Net interfaces
Task1
C# Collections
Task 2
№3 слайд![Interface declaration](/documents_6/963c9d24e68a81e16c414ef46064d19b/img2.jpg)
Содержание слайда: Interface declaration
№4 слайд![Interface declaration](/documents_6/963c9d24e68a81e16c414ef46064d19b/img3.jpg)
Содержание слайда: Interface declaration
№5 слайд![](/documents_6/963c9d24e68a81e16c414ef46064d19b/img4.jpg)
№6 слайд![Any class or struct that](/documents_6/963c9d24e68a81e16c414ef46064d19b/img5.jpg)
Содержание слайда: Any class or struct that implements the interface must implement all its members.
Any class or struct that implements the interface must implement all its members.
By using interfaces, we may include behavior from multiple sources in a class.
It is important in C# because the language doesn't support multiple inheritance of classes.
We must use an interface for simulating inheritance for structs, because they can't actually inherit from another struct or class.
№7 слайд![](/documents_6/963c9d24e68a81e16c414ef46064d19b/img6.jpg)
№8 слайд![FCL .Net Interfaces](/documents_6/963c9d24e68a81e16c414ef46064d19b/img7.jpg)
Содержание слайда: FCL .Net Interfaces
№9 слайд![](/documents_6/963c9d24e68a81e16c414ef46064d19b/img8.jpg)
№10 слайд![](/documents_6/963c9d24e68a81e16c414ef46064d19b/img9.jpg)
№11 слайд![Task - . Develop interface](/documents_6/963c9d24e68a81e16c414ef46064d19b/img10.jpg)
Содержание слайда: Task 5-1.
Develop interface IFlyable with method Fly().
Create two classes Bird (with fields: name and canFly) and Plane (with fields: mark and highFly) , which implement interface IFlyable.
Create List of IFlyable objects and add some Birds and Planes to it. Call Fly() method for every item from the list of it.
№12 слайд![C Collections .NET framework](/documents_6/963c9d24e68a81e16c414ef46064d19b/img11.jpg)
Содержание слайда: C# Collections
.NET framework provides specialized classes for data storage and retrieval.
There are two distinct collection types in C#:
The standard collections from the System.Collections namespace
The generic collections from System.Collections.Generic.
Generic collections are more flexible and safe, and are the preferred way to work with data.
№13 слайд![C Collections](/documents_6/963c9d24e68a81e16c414ef46064d19b/img12.jpg)
Содержание слайда: C# Collections
№14 слайд![ArrayList ArrayList is a](/documents_6/963c9d24e68a81e16c414ef46064d19b/img13.jpg)
Содержание слайда: ArrayList
ArrayList is a special array that provides us with some functionality over and above that of the standard Array.
Unlike arrays, an ArrayList can hold data of multiple data types.
We can dynamically resize it by simply adding and removing elements.
№15 слайд![ArrayList](/documents_6/963c9d24e68a81e16c414ef46064d19b/img14.jpg)
Содержание слайда: ArrayList
№16 слайд![ArrayList](/documents_6/963c9d24e68a81e16c414ef46064d19b/img15.jpg)
Содержание слайда: ArrayList
№17 слайд![List lt T gt List lt T gt is](/documents_6/963c9d24e68a81e16c414ef46064d19b/img16.jpg)
Содержание слайда: List<T>
List<T> is a strongly typed list of objects that can be accessed
by index.
It can be found under System.Collections.Generic namespace
№18 слайд![List](/documents_6/963c9d24e68a81e16c414ef46064d19b/img17.jpg)
№19 слайд![Using IEnumerable interface](/documents_6/963c9d24e68a81e16c414ef46064d19b/img18.jpg)
Содержание слайда: Using IEnumerable interface
№20 слайд![Dictionary A Dictionary, also](/documents_6/963c9d24e68a81e16c414ef46064d19b/img19.jpg)
Содержание слайда: Dictionary
A Dictionary, also called an associative array, is a collection of unique keys and a collection of values
Each key is associated with one value.
Retrieving and adding values is very fast.
№21 слайд![Dictionary Dictionary where](/documents_6/963c9d24e68a81e16c414ef46064d19b/img20.jpg)
Содержание слайда: Dictionary
Dictionary where we map domain names to their country names:
Retrieve values by their keys and print the number of items:
Print both keys and values of the dictionary:
№22 слайд![Queue A Queue is a](/documents_6/963c9d24e68a81e16c414ef46064d19b/img21.jpg)
Содержание слайда: Queue
A Queue is a First-In-First-Out (FIFO) data structure.
The first element added to the queue will be the first one to be removed.
Queues may be used to process messages as they appear or serve customers as they come.
Methods:
Clear(); removes all elements from the Queue.
Contains(object obj); determines whether an element is in the Queue.
Dequeue(); removes and returns the object at the beginning of the Queue.
Enqueue(object obj); adds an object to the end of the Queue.
ToArray(); Copies the Queue to a new array.
№23 слайд![Queue](/documents_6/963c9d24e68a81e16c414ef46064d19b/img22.jpg)
№24 слайд![Stack A stack is a](/documents_6/963c9d24e68a81e16c414ef46064d19b/img23.jpg)
Содержание слайда: Stack
A stack is a Last-In-First-Out (LIFO) data structure.
The last element added to the queue will be the first one to be removed.
The C language uses a stack to store local data in a function. The stack is also used when implementing calculators.
№25 слайд![Stack](/documents_6/963c9d24e68a81e16c414ef46064d19b/img24.jpg)
№26 слайд![Task - . Collections Declare](/documents_6/963c9d24e68a81e16c414ef46064d19b/img25.jpg)
Содержание слайда: Task 5-2. Collections
Declare myColl of 10 integers and fill it from Console.
1) Find and print all positions of element -10 in the collection
2) Remove from collection elements, which are greater then 20.
Print collection
3) Insert elements 1,-3,-4 in positions 2, 8, 5. Print collection
4) Sort and print collection
Use next Collections for this tasks: List and ArrayList
№27 слайд![Homework](/documents_6/963c9d24e68a81e16c414ef46064d19b/img26.jpg)
Содержание слайда: Homework 5
№28 слайд![](/documents_6/963c9d24e68a81e16c414ef46064d19b/img27.jpg)