CSC152 2005S, Class 6: Text-based Input and Output Admin * Reading for tomorrow: "Strings in Java" * Bounty remains (and I'm sorry for the pages that work incorrectly). Overview: * Questions on friday's lab? * Questions on the reading? * Lab * Reflection (maybe) Reminder about structure of a main class package rebelsky.io; public class NameOfClass { public static void main(String[] args) throws Exception { // First: Declare "names" String password; // "I will use the name 'password' // for an object of type String java.io.BufferedReader eyes; // Second: Associate the names with objects password = "foo"; eyes = new java.io.BufferedReader(a whole bunch of parameters whose details I forget); // Finally: Tell the objects to do stuff password.encodeYourself(); } // main(String[]) } // class NameOfClas Detour: * Java wants to know the "type" of almost anything you use in the program. * Scheme is friendlier; it lets you choose types on the fly * Experience suggests that most programmers' do not use types as consistently as they should. * We can catch errors early (E.g. "3 + password" is wrong, because you can't add strings and numbers) Attempt the lab! * In lab, unless I explicitly tell you to work alone, assume that you should work with a partner.