public class Discussion2{ public static void main(String [] args){ String [] channels = {"Beth","Lisa","Sarah","Jon","Katherine","Louis"}; /************************************* * What do you think this will do? ***********************************/ //System.out.println(channels); /************************************* * What do you think this will do? ***********************************/ //System.out.println(channels[1]); /************************************* * What do you think this will do? ***********************************/ int [] tutors = new int[4]; for(int i = 0; i < tutors.length; i++){ tutors[i] = i+2; } /************************************* * What do you think this will do? ***********************************/ //for(int i = 0; i < tutors.length; i++){ //System.out.println("Tutor "+i+1+" is: "+tutors[i]); //} /************************************* * What do you think this will do? ***********************************/ //for(int i = 0; i < tutors.length; i++){ //System.out.println("Tutor "+(i+1)+" is: "+tutors[i]); //} /************************************* * What do you think this will do? ***********************************/ // String ret = ""; // for(int i = 0; i < tutors.length; i++){ // ret = ret+"Tutor "+(i+1)+" is: "+channels[tutors[i]]+"\n"; // } // System.out.println(ret); /************************************* * What do you think this will do? ***********************************/ //Car[] cars = new Car[4]; //cars[0] = new Car(); //System.out.println(cars[0]); /************************************* * What do you think this will do? ***********************************/ //String hello1 = "hello"; //String hello2 = "HELLO"; //System.out.println(hello1.equalsIgnoreCase(hello2)); /************************************* * SETTERS AND GETTERS ***********************************/ /* * MPG, Doors and Color -- * should only have getters, so they * should just return the value for that * instance. * * gas -- * Getter should return how much gas remains * Setter should decrement or increment the * amount of gas accordingly. * * miles -- * Getter should return how many miles have * driven so far * Setter should add to the amount of miles, * and decrement the gas accordingly, this * should return a boolean, true if the gas * went below 0 gallons. * * playlist -- * Getter should print: * Your current stations for car 1 are: * Station 1 -- Rock * Station 2 -- Hip Hop * Station 3 -- Jazz * Station 4 -- Rap * Station 5 -- R&B * Setter should reset the station and should print: * Your current stations for car 1 are: * Station 1 -- Rock * Station 2 -- Hip Hop * Station 3 -- Jazz * Station 4 -- Rap * Station 5 -- R&B * * Setting station 1 to Rap * * Your new stations for car 1 are: * Station 1 -- Rap * Station 2 -- Hip Hop * Station 3 -- Jazz * Station 4 -- Rap * Station 5 -- R&B * * And should print this if there is an error: * Your current stations for car 2 are: * Station 1 -- Alternative * Station 2 -- Dance * Station 3 -- Instrumental * Station 4 -- Techno * Station 5 -- News Radio * * Invalid Station '0' * Same for Invalid Channel. * * */ /********************************************* * More sample output will be posted tonight ********************************************/ } }