M/F 2:30-3:20 |
CS 1130: Transition to OO Programming Spring 2016 |
Main
About: Overview Announcements Staff Consultants Calendar Materials: Texts DrJava Terminology Lectures: In-Class Web-Based VideoNote Assessment: Grading Assignments Labs Resources: CMS Piazza (link) Piazza (about) Java API Style Guide Academic Integrity |
Module 1, Part 6Reading and Writing FilesMany applications require the ability to read and write files on the computer's hard drive. In Java, this is done using classes in package java.io. This illustrates a useful paradigm of OO programming in Java. Want to add a new kind of functionality? Write a package of classes for it. The basic language remains the same, but a new package allows you to do more. Each version of Java generally comes with more packages. Here are examples of packages:
This module consists basically of a short assignment to get you familiar with reading and writing files. Contents1. Lab for Reading and Writing FilesLab InstructionsComments: This is a "lab" and not a real programming assignment. It guides you through a few steps so that you learn quickly about read and writing files. You will have to write two procedures, but they should take only 5-10 minutes each. Then, in the future, if you have to read or write a file, you will know where to look --the class that you will download from the course website. |