CSC 142/Chapter 6
From charlesreid1
Chapter 6: File Processing
Sections:
6.1 File reading basics
6.2 Token based processing
6.3 Line based processing
6.4 Advanced file processing
6.5 Case study: zip code lookup
Chapter 3 focused on a scanner for user input. Chapter 6 focuses on a scanner for file reading.
Many intro programming classes see this as a complicated topic, and Java doesn't make it easy. It's awkward, but it's manageable.
We will also explore exceptions relate to file processing.
(Python makes this a dream.)
with open('data.txt','r') as f:
lines = f.readlines()
Done.
Flags
| CSC 142 - Intro to Programming I Computer Science 142 - Intro to Programming I, South Seattle College.
Chapter 1: Intro to Java CSC 142/Chapter 1 Chapter 2: Primitive Data and Definite Loops CSC 142/Chapter 2 Chapter 3: Parameters and Objects CSC 142/Chapter 3 Chapter 4: Conditional Execution CSC 142/Chapter 4 Chapter 5: Program Logic and Indefinite Loops CSC 142/Chapter 5 Chapter 6: File Processing CSC 142/Chapter 6 Chapter 7: Arrays CSC 142/Chapter 7 Chapter 8: Classes CSC 142/Chapter 8
Puzzles: Puzzles
Category:Teaching · Category:CSC 142 · Category:CSC Related: CSC 143 Flags · Template:CSC142Flag · e |