Week 18 Day 3 - Use Cases

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=nC8pSzOJwf8



Duration: 1:28:15
91 views
1


Today, the final lecture of the semester, I talked about how to put together all of your knowledge from CSCI 41 when designing and implementing a project. You have to first understand what it is you're being asked to do, at a somewhat deep level, and how people are going to use your code so that you can choose a data structure that will make those operations go fast.


For example, if you're going to be doing a Huffman decoding, you'll be doing - over and over again, reading a series of bits from an encoded file and testing to see if that string matches anything in the dict. Using either a binary trie (and moving a pointer left with each 0 and right with each 1) or a hash table (querying to see if the string matches any known key) would be sufficient for such operations.


I then switched to a sample grocery store inventory application, gathering use cases from students about what sorts of operations a manager might want to use the inventory program for. Since names might not be unique, and since we'll often want to do substring matching on names (such as wanting to see how much "coffee" we have and getting Starbucks coffee, Tully's coffee, etc.) we can't use names as a key to search on. IPCs are unique, so I guess we'll index based on that, but we may just want to suck it up and have to do O(N) substring matches for name searches, unless you want to be more creative about it (for example you could cache results for common search terms). You can finish implementing this to substitute for any individual programming assignment you didn't 10/10.


I then talked a bit about the Java Jeopardy assignment, and showed how to get going on it, by running the client and the server, and what was expected of you. It shouldn't be too difficult, and you can work in groups of up to six.


Thanks for a great semester!







Tags:
csci 41
data structures
use cases