All language subtitles for 2. Abstract Data Types

af Afrikaans
ak Akan
sq Albanian
am Amharic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

1 1

Okay, I thought I'd do a brief video 2

2

on abstract data types because lists 3

3

is the first abstract data type 4

4

we're going to look at in the course. 5

5

So an abstract data type isn't a concrete data structure 6

6

in the sense that an array is. 7

7

It doesn't dictate how the data is organised. 8

8

With arrays, we know that we have to store 9

9

all the items as one contiguous blah 10

10

and arrays also dictate that every item in the array 11

11

has to occupy the same amount of memory. 12

12

So arrays are telling us how the data has to be stored 13

13

but lists don't do that. 14

14

Lists are more of a conceptual idea 15

15

and they dictate the operations we can perform 16

16

on the data set, not the items themselves. 17

17

An abstract data type doesn't do something 18

18

like say you can only multiply these items together, 19

19

it's more that it dictates how we can access the items. 20

20

Can we do random access? 21

21

Can we get to the first item that we added? 22

22

Can we get to the last item that we added? 23

23

And so, an abstract data type is more about behaviour 24

24

and what operations you can do. 25

25

Now in Java, a concrete data structure like an array 26

26

is usually a class. 27

27

Arrays might actually be an exception to that. 28

28

So you'll see as we go through the course 29

29

and we look at other concrete data structures, 30

30

there's usually a class for them in the JDK. 31

31

When it comes to an abstract data type, 32

32

normally those are interfaces, which makes sense right? 33

33

Because they're not telling you how to store the data, 34

34

they're specifying behaviour and that's 35

35

commonly done with an interface. 36

36

And so basically, any data structure can be used 37

37

to implement an abstract data type, 38

38

as long as you have a class that implements the interface 39

39

for the abstract data type, 40

40

any class can behave like that abstract data type. 41

41

So in the case of lists, any class that implements 42

42

the list interface, is a list 43

43

and so you could have a class that uses 44

44

an array for the list. 45

45

If that class implements the list interface, 46

46

it can be treated like a list. 47

47

You could have a class, 48

48

this would be a terrible thing to do, 49

49

but you could have a class that has individual fields 50

50

for every item in the list. 51

51

As long as that class implements the list interface, 52

52

it's a list. 53

53

You can treat it like a list. 54

54

And so when it comes to an abstract data type, 55

55

they're not concrete data structures, 56

56

they don't dictate how the data can be stored, 57

57

but they do dictate the operations you can do 58

58

on the abstract data type. 59

59

So for example with lists, let's say you can add an item, 60

60

you can remove an item, 61

61

you can get the index of an item, et. Cetera, 62

62

but they don't say and this is the way 63

63

you have to store the items in the list. 64

64

They don't say that. 65

65

So now that we have some idea what an abstract dat type is, 66

66

let's move on to looking at list in the JDK. 67

67

I'll see you in the next video.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.