Introduction to Data Structures Erick, Eka, Reddy © Sekolah Tinggi Teknik Surabaya 1
» Type defined in terms of its data items and associated operations, not its implementation 2 © Sekolah Tinggi Teknik Surabaya
» C++ » C# » Java » Python Using Class mechanism 3 © Sekolah Tinggi Teknik Surabaya
4
5 Interface Implementation
Data + Operations? 6 © Sekolah Tinggi Teknik Surabaya
» Seats » Seats reserved or available 7 © Sekolah Tinggi Teknik Surabaya
» Determine available seats » Reserve a seat » Cancel a reservation » Find a block of available seats 8 © Sekolah Tinggi Teknik Surabaya
» Declare n char variables for n seats » Create a char array of size n for n seats 9 © Sekolah Tinggi Teknik Surabaya
» All variables initially marked with ‘A’ (Available) » Reserved seats will be marked with an ‘R’ (Reserved) » How do we go about listing available seats? 10 © Sekolah Tinggi Teknik Surabaya
» All elements initially marked with ‘A’ (Available) » Reserved seats will be marked with an ‘R’ (Reserved) » How do we go about listing available seats? 11 © Sekolah Tinggi Teknik Surabaya
» Determine available seats » Reserve a seat » Cancel a reservation » Find a block of available seats 12 © Sekolah Tinggi Teknik Surabaya
» Required Operations » Common Operations » Efficiency of The Operations ˃Sorting ˃Searching ˃Inserting ˃Removing ˃Modifying ˃Traversing 13 © Sekolah Tinggi Teknik Surabaya
» Introduction to Object Oriented Programming: Class ˃ 69/Introduction-to-Object-Oriented- Programming-Concephttp:// 69/Introduction-to-Object-Oriented- Programming-Concep 14 © Sekolah Tinggi Teknik Surabaya
Final Note © Sekolah Tinggi Teknik Surabaya 15