1 / 17

CSSE221: Software Dev. Honors Day 15

CSSE221: Software Dev. Honors Day 15. Announcements Pass in UML for Cars, Trucks, Trains Homework 5 late day? Pass in now Better to defer CSSE230 until Spring Exam 1 next class: if you qualify for extra time, talk to me later this class. How are the capsule demos and prep going?

lamis
Download Presentation

CSSE221: Software Dev. Honors Day 15

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSSE221: Software Dev. Honors Day 15 • Announcements • Pass in UML for Cars, Trucks, Trains • Homework 5 late day? Pass in now • Better to defer CSSE230 until Spring • Exam 1 next class: if you qualify for extra time, talk to me later this class. • How are the capsule demos and prep going? • What’s working? • What do you plan to do differently next time? • Yesterday’s groups will get grade later this week.

  2. This week: Markov • Monday: • Stacks and Queues • Sets, Maps, and PriorityQueues • Tuesday: • Some pros and cons of various data structures • Brief example of file I/O • Introduction to Markov, a cool statistical text program with lots of data structures • Thursday: • Exam 1

  3. Questions on Exam 1?

  4. Demo • Wrap up of Sets, Maps, and PriQueues • By the way, which of the data structures that we discussed yesterday could be called an associative array?

  5. Markov Teams Repos is csse221-200810-<usr1>-<usr2>. If solo, use your personal repos. bennetrn-beltonj1 fishmad-sullivja skilessa-speyerea crockeea-morrisps johnsoad-priestjs lundgrpb-smithny leveyjr-wentztj bennindp-mcginnda Find your partner

  6. Simple File I/O • Key concepts: • File objects and exceptions: • new File(“fileName”) • Output: construct a PrintWriter from that file, and use it in place of System.out) • Input: construct a Scanner from that file and use it like you would getting keyboard input • Demo: SimpleFileIODemo

  7. Use other techniques for reading binary files • Data is more compact than text • .read(), .write() methods • Maybe we’ll study later?

  8. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Processing: Gather word pattern statistics Store them in an appropriate data structure Markov • Output: a text file with many of the same properties as the original file • Full-justified, of course 

  9. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Statistics: Markov

  10. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Statistics: Markov

  11. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Statistics: Markov

  12. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Statistics (n=2): Markov

  13. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Statistics (n=2): Markov

  14. Input: a text file the skunk jumped over the stump the stump jumped over the skunk the skunk said the stump stunk and the stump said the skunk stunk Statistics (n=2): Markov

  15. n=1: the skunk the skunk jumped over the skunk stunk the skunk stunk n=2: the skunk said the stump stunk and the stump jumped over the skunk jumped over the skunk stunk Note: it’s also possible to hit the max before you hit the last nonword. Output

  16. For the prefixes? For the set of suffices? To relate them? Statistics (n=2): Data structures

  17. Full Justification • Do this step LAST • Output needs to be full-justified. • Required to use lists (array and linked) to hold the output line and modify it before you print it

More Related