ITP Data Rep - Class3

  • 306 views
Uploaded on

These are class notes for my ITP Data Representation class. Likely not very useful for people who aren't taking the class.

These are class notes for my ITP Data Representation class. Likely not very useful for people who aren't taking the class.

More in: Sports , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
306
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
9
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. Data Representation Day 3
  • 2. 2. Parse the data into useful Objects
  • 3. Collections - Arrays, ArrayLists, Objects & Hashmaps
  • 4. WFF screenshot
  • 5. API
  • 6. ApplicationProgrammingInterface
  • 7. class FeelingObject { String feeling; String sentence;XML String gender; FeelingObject(); }
  • 8. class FeelingObject { class FeelingObject { class FeelingObject { class FeelingObject {XML String feeling; String feeling; String feeling; String feeling; String sentence; String sentence; String sentence; String sentence; String gender; String gender; String gender; String gender; FeelingObject(); FeelingObject(); FeelingObject(); FeelingObject(); } } } }
  • 9. class FeelingObject { class FeelingObject { class FeelingObject { class FeelingObject { String feeling; String feeling; String feeling; String feeling; String sentence; String sentence; String sentence; String sentence; String gender; String gender; String gender; String gender; FeelingObject(); FeelingObject(); FeelingObject(); FeelingObject(); } } } } class FeelingObject { class FeelingObject { class FeelingObject { class FeelingObject { String feeling; String feeling; String feeling; String feeling; String sentence; String sentence; String sentence; String sentence; String gender; String gender; String gender; String gender; FeelingObject(); FeelingObject(); FeelingObject(); FeelingObject(); } } } } class FeelingObject { class FeelingObject { class FeelingObject { class FeelingObject {XML String feeling; String feeling; String feeling; String feeling; String sentence; String sentence; String sentence; String sentence; String gender; String gender; String gender; String gender; FeelingObject(); FeelingObject(); FeelingObject(); FeelingObject(); } } } } class FeelingObject { class FeelingObject { class FeelingObject { class FeelingObject { String feeling; String feeling; String feeling; String feeling; String sentence; String sentence; String sentence; String sentence; String gender; String gender; String gender; String gender; FeelingObject(); FeelingObject(); FeelingObject(); FeelingObject(); } } } } class FeelingObject { class FeelingObject { class FeelingObject { class FeelingObject { String feeling; String feeling; String feeling; String feeling; String sentence; String sentence; String sentence; String sentence; String gender; String gender; String gender; String gender; FeelingObject(); FeelingObject(); FeelingObject(); FeelingObject(); } } } }
  • 10. class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class classXML class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class
  • 11. class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class classArrayList feelingList = class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class class
  • 12. Arrays vs. ArrayLists
  • 13. Arrays vs. ArrayLists
  • 14. Arrays fast easy to usegood for known quantities
  • 15. ArrayLists flexible full-featuredgood for changing quantities
  • 16. Basic ArrayLists ArrayList myList = new ArrayList(); CheeseBurger cb = new CheeseBurger(); myList.add(cb);
  • 17. Basic ArrayLists CheeseBurger cb = myList.get(0); cb.eat();
  • 18. Basic ArrayLists CheeseBurger cb = myList.get(0);X cb.eat();
  • 19. Basic ArrayLists CheeseBurger cb = (CheeseBurger) myList.get(0); cb.eat();
  • 20. ArrayLists w/ Generics ArrayList<CheeseBurger> myList = new ArrayList(); CheeseBurger cb = new CheeseBurger(); myList.add(cb);
  • 21. ArrayLists w/ Generics CheeseBurger cb = myList.get(0);√ cb.eat();
  • 22. HashMaps
  • 23. HashMapsStore objects by a keyHelpful for keeping counts of categoriesUseful for keeping checklists
  • 24. HashMapsHashMap<keyType, valueType>myMap = new HashMap();CustomObject o = new CustomObject();myMap.put(key, o);CustomObject o = myMap.get(key)