COP 3337
Spring Semester 2008
Read this first!
NOTE: Students must bring printed copies of all class handouts and sample
programs to class. Class handouts are in MS Word '97 format.
Additional files may be posted throughout the semester.
This web page is intended to supplement the textbook
Big Java by Cay Horstmann.
Sample programs are plain text .java files and can be downloaded and run.
(Programs have all been tested and contain no syntax or logic errors.)
Got Java?
Follow the link above, scroll down to the heading "J2SE 5.0 Documentation "and click the Download button
Before Beginning (Class policies, etc)
Textbook Resources
- Big Java, Third Edition
1.) Style and Documentation Standards for Java Programs
(Appendix A)2.) Data Files and I/O Review
(Sections 19.1 and 19.2)
3.) The Java Array
(Sections 7.1 and 7.5 - 7.7)
4.) Designing Classes (and more)
(Chapter 8)5.) Interfaces and Polymorphism
(Chapter 9)
6.) Inheritance and Polymorphism
(Chapter 10)
7.) Java Collections and The ArrayList and LinkedList Classes
(Sections 7.2 - 7.4 and 15.1)8.) Intro to Data Structures: Creating Generic Classes, Linked Lists, Stacks, and Queues
(Chapters 15 and 17)
9.) Recursion (see recursion)
(Chapter 13)
10.) Exception-Handling
(Chapter 11)
BadDataException.java | DataSetReader.java | DataSetTester.java
BadDataException.java defines a new exception class
DataSetReader.java has a method called readFile() which reads a file and returns an array containing the values read. Various types of exceptions are thrown if the file cannot be found or is ill-formed in any of a number of ways
The test class - DataSetTester.java - catches the exceptions which may be thrown in the DataSetReader class and resumes execution
The data files tested: bad1.dat | bad2.dat | bad3.dat | bad4.dat | good.dat