Podcast: Play in new window | Download
Control Structures
Definition:
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
- the key here is that data structures use data efficiently
- different data structures are best suited to different situations
- reduces the amount of variables
What kinds of ways could you organize data?
- List
- Map
- Set
- These are known as Collections (generic term)
- List – Store bunch of items for later iteration
- Map – For a given (something) what is the (something else) – key/value
- Set – Used to maintain a unique List
List Example – Contacts
Map Example –
“Honda” -> “Civic”, “Prelude”
“Toyota” -> “Corolla”, “Celica”, “Rav4″
“Ford” -> “Focus”, “Mustang”
“Audi” -> “R8″
Set Example – Check to see which words were used in a sentence
Interesting Note: You can use one Collection inside of another
Homework:
http://howtoprogramwithjava.com/the-5-basic-concepts-of-any-programming-language-concept-3/
Interesting Links:
Easy to Understand
Easy to Implement
Extremely Useful








{ 7 comments… read them below or add one }
Hey Trev, your site and weekly posts are great and very helpful. This makes the initial stage into programming more enjoyable. Thank you and keep up with the good work
Always a pleasure Lam, I’m glad you find these tutorials helpful, keep up the learning!
hey Trevor, thanks a lot! I have been listening to your podcasts and you have cleared a lot of stuff for me already Im only starting to understand better (even after Barnes & Kolling).
keep up the good work! cant wait for your next podcast!
Thanks Norman, that’s some great feedback, I really appreciate it!
I have been so stupidly busy this past week, but I’m going to try and get a new podcast episode recorded and released in the next 12 hours
PS… thanks for buying my eBook, now I *really* have to record an episode for you
trevor you are a great teacher and i have just started learning programming and with these podcasts and tutorials i will be a good programmer. i could not even get started because i met one lecturer who made me think that programming is only for the very bright students and i had to quit . but now i know i will go far. thank you and God bless you keep up with your good work.
Clearly that lecturer wants to think that he’s smarter than he actually is! Good for you for ignoring him and pushing forward, it shows that you’ve got a good head on your shoulders.
Let me know if you have any questions about programming, I’ll be glad to help you out.