7 Pages

10-13 Class Notes CS 107

Course: COP 2271, Fall 2010
School: UCF
Rating:
 
 
 
 
 

Word Count: 1894

Document Preview

Class 10-13 Notes CS 107 Wednesday, October 13, 2010 1:00 PM Announcements: Questions? Last Time: Description of program #4, Idea of arrays Today: Syntax for arrays, Arrays examples Syntax for arrays: Rather than having to store multiple values of the same type in different variables, we can store them in an array. This is appropriate when we have a group of values of the same type, such as a list of numbers, or...

Register Now

Unformatted Document Excerpt

Coursehero >> Florida >> UCF >> COP 2271

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Class 10-13 Notes CS 107 Wednesday, October 13, 2010 1:00 PM Announcements: Questions? Last Time: Description of program #4, Idea of arrays Today: Syntax for arrays, Arrays examples Syntax for arrays: Rather than having to store multiple values of the same type in different variables, we can store them in an array. This is appropriate when we have a group of values of the same type, such as a list of numbers, or a group of characters representing a playing board for a game. To declare an array, we use: type[ ] arrayName; where type can be any type (e.g. char, int, float), arrayName is an identifier you make up, and size indicates how many items will be stored in the array. We then must initialize the array using: arrayName = new type[ size]; For example int[ ] scores; scores = new int[ 10] ; declares and initializes an array called theScores that can hold 10 integers. In the array shown above the first element is the 0th element, and the last is the 9th element. This element number is known as the index (a.k.a. the subscript) , which starts at 0 and goes to n-1 for an array of n elements. Note that the default value of 0 is stored in each of the 10 array positions at this point. Array Usage 1. Store a value into an array by using the array name with the subscript on the left-hand side of an assignment statement. E.g.: scores[ 3] = 75; // store 75 into array element 3 (the 4th element) 2. Retrieve a value from an array by using the array name with the subscript anywhere a value is needed. E.g.: System.out.println( scores[ 1]); sum = sum + scores[ i]; // i is an integer between 0 and 10 3. You must make sure that you never read or write past the end of the array. The compiler will not stop you, but your program will generate an error and stop when you try to access an out-of-bounds element. 4. Arrays can be initialized element by element in a loop for (i=0; i<10; i++) { theScores[ i] = 0; } or by putting initial values in braces when the array is declared: int[ ] scores = {0,0,0,0,0,0,0,0,0,0}; In the above case the size is inferred from the number of initializing values. 107 Fall 2010 Page 1 } or by putting initial values in braces when the array is declared: int[ ] scores = {0,0,0,0,0,0,0,0,0,0}; In the above case the size is inferred from the number of initializing values. Pasted from <http://logos.cs.uic.edu/Examples%20And%20Notes/notes/Java/ArraysAverageGrades/Arrays.htm > Sample programs using arrays (see code on web site) import java.io.*; import java.util.Scanner; class UsingAnArray { public static void main(String[] args) throws IOException { int[] scores; scores = new int[3]; // declare the array // initialize the array // Scanner for keyboard input Scanner keyboard = new Scanner( System.in); System.out.println( "Enter 3 scores to be averaged:"); scores[0] = keyboard.nextInt(); scores[1] = keyboard.nextInt(); scores[2] = keyboard.nextInt(); System.out.print( "The scores are: " ); System.out.println( scores[0] + ", " + scores[1] + ", " + scores[2]); System.out.print( "The average is: " ); System.out.println( (float)(scores[0]+scores[1]+scores[2])/3); } } Pasted from <http://logos.cs.uic.edu/Examples%20And% 20Notes/notes/Java/ArraysAverageGrades/UsingAnArray/UsingAnArray.java > And another version using a loop: /** * Use an array to store scores. * Also use a constant to declare the size. * and a loop to calculate the average. * */ import java.io.*; import java.util.Scanner; class UsingAnArrayB { final int ARRAY_SIZE = 10; Then use a loop to read in the values // declare a constant for the array size // note how easy it is to change this public static void main(String[] args) { UsingAnArrayB instance; instance = new UsingAnArrayB(); // use the default constructor instance.doit(); // now call the method } /* Must use a separate method to do this due to the limitations * of main() being static. We can't use instance variables (e.g. ARRAY_SIZE) * inside a static function. */ public void doit() 107 Fall 2010 Page 2 * of main() being static. We can't use instance variables (e.g. ARRAY_SIZE) * inside a static function. */ public void doit() { int[] scores; // declare the array scores = new int[ ARRAY_SIZE]; // initialize the array Scanner keyboard = new Scanner( System.in); // Scanner for keyboard input // Prompt for scores and enter them. Use the built-in array length. System.out.println( "Enter " + ARRAY_SIZE + " scores to be averaged:"); for (int i=0; i<scores.length; i++) { scores[i] = keyboard.nextInt(); } // Display the scores, accumulating the sum as we go int sum = 0; System.out.print( "The scores are: " ); for (int i=0; i<scores.length; i++) { System.out.print( scores[i] + ", "); sum += scores[i]; } System.out.println(); // Display the average System.out.print( "The average is: " ); System.out.println( (float)sum/ARRAY_SIZE); } } Pasted from <http://logos.cs.uic.edu/Examples%20And% 20Notes/notes/Java/ArraysAverageGrades/UsingAnArrayB/UsingAnArrayB.java > And yet another example, passing the array as a parameter to a method. /** * Use an array to store scores. * Also use a constant to declare the size. Then use a loop to read in the values * and a loop to calculate the average. * */ import java.io.*; import java.util.Scanner; class UsingAnArrayWithFunction { final int ARRAY_SIZE = 3; // declare a constant for the array size // note how easy it is to change this Scanner keyboard; // used for console IO public static void main(String[] args) { UsingAnArrayWithFunction instance; instance = new UsingAnArrayWithFunction(); // use the default constructor instance.doit(); // now call the method } /* Must use a separate method to do this * of main() being static. We can't use * inside a static function. */ public void doit() { int[] scores; // scores = new int[ ARRAY_SIZE]; // due to the limitations instance variables (e.g. ARRAY_SIZE) declare the array initialize the array keyboard = new Scanner( System.in); // Scanner for keyboard input getScores( scores); // call the method to get the scores // changes ARE reflected back! 107 Fall 2010 Page 3 keyboard = new Scanner( System.in); // Scanner for keyboard input getScores( scores); // call the method to get the scores // changes ARE reflected back! // Display the scores, accumulating the sum as we go int sum = 0; System.out.print( "The scores are: " ); for (int i=0; i<scores.length; i++) { System.out.print( scores[i] + ", "); sum += scores[i]; } System.out.println(); Display // the average System.out.print( "The average is: " ); System.out.println( (float)sum/ARRAY_SIZE); } public void getScores(int[] values) { // Prompt for scores and enter them. Use the built-in array length. System.out.println( "Enter " + ARRAY_SIZE + " scores to be averaged:"); for (int i=0; i<values.length; i++) { values[i] = keyboard.nextInt(); } } } Pasted from <http://logos.cs.uic.edu/Examples%20And% 20Notes/notes/Java/ArraysAverageGrades/UsingAnArrayWithFunction/UsingAnArrayWithFunction.java > Let's review what we know about sending parameters to methods and having them change, in light of the above example. See also other examples using arrays to count characters from an input line. (see code on web site) /** * Use an array to count the number of each character found on an inputline. * Running the program gives: * Enter some characters to be counted: aardvark A A R D V A R K The non-zero counts of alphabetic characters found are: A:3; D:1; K:1; R:2; V:1; * */ import java.util.Scanner; class CountCharacters { final int ARRAY_SIZE = 26; // for reading from input line // declare a constant for the array size public static void main(String[] args) { CountCharacters instance; instance = new CountCharacters(); instance.doit(); } // use the default constructor // now call the method /* Must use a separate method to do this due to the limitations * of main() being static. We can't use instance variables (e.g. ARRAY_SIZE) * inside a static function, like main is above. */ 107 Fall 2010 Page 4 */ public void doit() { int[] lettersArray; lettersArray = new int[ ARRAY_SIZE]; int i; // declare the array // initialize the array // loop counter Scanner keyboard = new Scanner( System.in); // initialize lettersArray count values for (i=0; i<lettersArray.length; i++) { lettersArray[ i] = 0; } // Prompt for and store a line of input. System.out.println("Enter some characters to be counted: "); String inputLine; inputLine = keyboard.nextLine(); // convert the string to all upper case inputLine = inputLine.toUpperCase(); // process the input line (from the array) one character at a time char c; // used to store an input character for analysis for ( i=0; i < inputLine.length(); i++) { c = inputLine.charAt( i); if ( Character.isLetter( c)) { // only count alphabetic characters lettersArray[ c - 'A']++; // update letter count, using // the character itself as the index System.out.print(c + " "); // echo input to the screen } } System.out.println(); // newline // display select portions of the table System.out.print("The non-zero counts of alphabetic characters found are: \n"); for (i=0; i<lettersArray.length; i++) { // display the array element and the number of occurences if( lettersArray[ i]>0) { System.out.print( (char)(i + 'A') + ":" + lettersArray[ i] + "; "); } } System.out.println(); // newline } } Pasted from <http://logos.cs.uic.edu/Examples%20And% 20Notes/notes/Java/ArraysAverageGrades/CountCharacters/CountCharacters.java > This can be modified to count characters from a file instead (e.g. all the characters in Shakespeare's Macbeth) Note where the data file should be stored! /** * Use an array to count the number of each character found on an inputline. * Running the program gives: * Now counting the characters stored in Macbeth.txt The counts of alphabetic characters found are: A:6585; B:1555; C:2300; D:3485; E:11898; F:1801; G:1590; H:5450; I:5254; J:44; K:788; L:3717; M:2615; N:5590; O:6875; P:1289; Q:131; R:5160; S:5545; T:7965; U:3081; V:425; W:2058; X:208; Y:1990; Z:30; * */ import java.util.Scanner; import java.io.FileInputStream; import java.io.FileNotFoundException; // for reading from a file // for file errors 107 Fall 2010 Page 5 class CountCharsFromFileUsingScanner { final int ARRAY_SIZE = 26; final String FILENAME = "Macbeth.txt"; // declare a constant for the array size // declare filename to use public static void main(String[] args) { CountCharsFromFileUsingScanner instance; instance = new CountCharsFromFileUsingScanner(); // use the default constructor instance.doit(); // now call the method } /* Must use a separate method to do this due to the limitations * of main() being static. We can't use instance variables (e.g. ARRAY_SIZE) * inside a static function, like main is above. */ public void doit() { int[] lettersArray; // declare the array lettersArray = new int[ ARRAY_SIZE]; // initialize the array int i; // loop counter // declare the Scanner to read from a file Scanner inputStream = null; // use a "try - catch" block to gracefully handle errors if file is not found try { inputStream = new Scanner( new FileInputStream( FILENAME)); } catch( FileNotFoundException e) { // handle the "exception" (the error) if the file was not found System.out.println("*** Sorry, the input file " + FILENAME + " was not found. " + " Exiting program...\n"); System.exit( -1); // terminate program } // initialize lettersArray count values for (i=0; i<lettersArray.length; i++) { lettersArray[ i] = 0; } System.out.println("Now counting the characters stored in " + FILENAME); // now read from the file one line at at time, verifying that the read succeeded. String inputLine; while ( inputStream.hasNextLine()) { inputLine = inputStream.nextLine(); // convert the string to all upper case inputLine = inputLine.toUpperCase(); // process the input line (from the array) one character at a time. // We don't echo input characters to the screen because that would take too long. char c; // used to store an input character for analysis for ( i=0; i < inputLine.length(); i++) { c = inputLine.charAt( i); if ( Character.isLetter( c)) { // only count alphabetic characters lettersArray[ c - 'A']++; // update letter count, using the // character as the index } } }// end while System.out.println(); // newline // display select portions of the table System.out.print("The counts of alphabetic characters found are: \n"); for (i=0; i<lettersArray.length; i++) { // display the array element and the number of occurences System.out.print( (char)(i + 'A') + ":" + lettersArray[ i] + "; "); } System.out.println(); // newline 107 Fall 2010 Page 6 System.out.println(); } } // newline Pasted from <http://logos.cs.uic.edu/Examples%20And% 20Notes/notes/Java/ArraysAverageGrades/CountCharactersFromFile/CountCharsFromFileUsingScanner.ja va> 107 Fall 2010 Page 7
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

UCF - COP - 2271
10-15 Class Notes CS 107Friday, October 15, 2010 3:52 PMAnnouncements: We are ending week 8, more than half way through the semester!Questions?Last Time: Arrays: declaration, syntax, passing as parameters, usage in counting input characters Today: Exa
UCF - COP - 2271
10-18 Class Notes CS 107Monday, October 18, 2010 2:09 PMAnnouncements: See updates online to program #4 description. See also sample video. Note that deadline has been extended to Tuesday 10/26 at noon.Questions? Last Time: Making an array of Square; B
UCF - COP - 2271
10-20 Class Notes CS 107Wednesday, October 20, 2010 2:40 PMAnnouncements: Sorry, but grades not yet ready to be posted. Maybe tonight? Remember that midterm #2 is next week, in lab, and in class next Friday Questions? Last Time: Mostly comments on progr
UCF - COP - 2271
10-21 Class Notes CS 107Friday, October 22, 2010 4:04 PMAnnouncements: Midterm #2 next week (in class Friday), program due Tuesday noon Questions? Last Time: Array examples Today: More array examples, Recursion IntuitionArrays Examples: Dynamic Array W
UCF - COP - 2271
10-25 Class Notes CS 107Monday, October 25, 2010 2:01 PMAnnouncements: In-lab portion of midterm #2 will be this week during your normally scheduled lab time. The in-class portion has been delayed from Friday until Monday, a week from today. Questions?
UCF - COP - 2271
10-27 Class Notes CS 107Wednesday, October 27, 2010 12:39 PMAnnouncements: - Remember in-class portion of midterm #2 in class on Monday. - Solution to program #4 posted onlineQuestions? Last Time: Recursion intuition and trace mechanisms of calculating
UCF - COP - 2271
10-29 Class Notes CS 107Friday, October 29, 2010 12:30 PMAnnouncements: - Remember in-class portion of midterm #2 will be on Monday.Questions?Last Time: Recursion examples &amp; traces Today: The maze problem: combining arrays with recursionA detailed ex
UCF - COP - 2271
11-03 Class Notes CS 107Wednesday, November 03, 2010 2:52 PMAnnouncements: - Results for the in-class portion of midterm #2 have been mailed around. Solution to the in-class portion is posted online. Min 40, Avg 62, Max 94 Questions? Last Time: Midterm
UCF - COP - 2271
11-08 Class Notes CS 107Monday, November 08, 2010 2:01 PMAnnouncements: - See web site for description of program #5 Questions? Last Time: - Prof. John Lillis went through an example of using arrays in Java Today: - Discussion of program #5 - Finish the
UCF - COP - 2271
11-10 Class Notes CS 107Wednesday, November 10, 2010 2:58 PMAnnouncements: See changes to program #5Questions?Last Time: Maze problem, comments on programToday: Finish the maze problem Comments on program #5 Linked List example (time permitting.)/*
UCF - COP - 2271
11-10 Linked Lists CS 107Wednesday, November 10, 2010 4:49 PM107 Fall 2010 Page 1107 Fall 2010 Page 2107 Fall 2010 Page 3
UCF - COP - 2271
11-12 Class Notes CS 107Friday, November 12, 2010 4:00 PMAnnouncements: See latest changes to program, regarding delimiters. Program submission has been enabled in Blackboard for Program #5Questions? Last Time: program discussion, linked listsToday: P
UCF - COP - 2271
11-12 Linked Lists CS 107Friday, November 12, 2010 4:49 PM107 Fall 2010 Page 1107 Fall 2010 Page 2107 Fall 2010 Page 3
UCF - COP - 2271
11-15 Class Notes CS 107Monday, November 15, 2010 2:15 PMAnnouncements: Remember the program is due tomorrow. Questions? Last Time: Linked list intuition Today: Code to implement a linked list; Recursively reversing a linked list107 Fall 2010 Page 110
UCF - COP - 2271
11-15 Reverse linked list recursivelyMonday, November 15, 2010 2:20 PM107 Fall 2010 Page 1
UCF - COP - 2271
11-17 Class Notes CS 107Wednesday, November 17, 2010 2:50 PMAnnouncements: See posting for program #6, BeatBox Questions? Last Time: Linked list example, started on example to reverse linked list Today: program #6 description, continue linked list examp
UCF - COP - 2271
11-19 Class Notes CS 107Friday, November 19, 2010 4:03 PMAnnouncements: See updates to program online Questions? Last Time: Not much, really! Today: No matter what, better than last class. - Program updates description, installation hints - recursively
UCF - COP - 2271
11-19 Reverse linked list recursivelyFriday, November 19, 2010 2:20 PM107 Fall 2010 Page 1
UCF - COP - 2271
11-22 Class Notes CS 107Monday, November 22, 2010 2:06 PMAnnouncements: It is drizzling outside.Questions? How to pick a file: String newFileName = FileChooser.pickAFile();Last Time: Comments on last program; Recursively reversing a linked list Today:
UCF - COP - 2271
11-24 Class Notes CS 107Monday, November 22, 2010 2:06 PMAnnouncements: In-lab portion of the final: you will again be given &quot;driver&quot; code and you will have to create the class so that it compiles. Questions?Last Time: Comments on last program; Recursi
UCF - COP - 2271
12-01 Class Notes CS 107Wednesday, December 01, 2010 12:57 PMAnnouncements: Grades If you have issues with any of your grades, please first follow up with the TA who graded that assignment/project/lab/quiz. To see who graded what, please visit the Lab &amp;
UCF - COP - 2271
12-01 Programming Languages, CS 107Monday, November 29, 2010 2:52 PM107 Fall 2010 Page 1107 Fall 2010 Page 2107 Fall 2010 Page 3
UCF - COP - 2271
12-03 Class Notes CS 107Friday, December 03, 2010 2:00 PMAnnouncements: Before midnight tonight (I promise) see grades updates on the course web site at: http:/logos.cs.uic.edu/107/grades/index.html Questions? Last Time: Description of final exam; Brief
UCF - COP - 2273
08-22 Class Notes CS 107Monday, August 22, 2011 12:58 PMWelcome to CS 107! Course web site: bit.ly/cs107 (which redirects to http:/sites.google.com/site/cs107 ) Introductions: Your instructor Your TAs: Shuyang Lin, Geli Fei [See the &quot;Lab &amp; TA&quot; link on t
UCF - COP - 2273
08-24 Class Notes CS 107Wednesday, August 24, 2011 1:05 PMAnnouncements: 1. Course web site is at: bit.ly/uic107 2. Class recordings are on Blackboard 3. There are no lab makeups unless you can go to a subsequent lab the same day, there is space, and th
UCF - COP - 2273
08-26 Class Notes CS 107Friday, August 26, 2011 3:47 PMAnnouncements: 1. Everyone must register their iClicker using Blackboard. After you login, find the &quot;Tools&quot; option on the left, then find &quot;Register your iClicker Remote&quot; [See image below] iClicker r
UCF - COP - 2273
08-29 Class Notes CS 107Monday, August 29, 2011 8:47 AMAnnouncements: - If you are joining the class for the first time today, the course web site is: http:/bit.ly/uic107 Carefully review the information on this site, particularly the syllabus on the ma
UCF - COP - 2273
08-31 Class Notes CS 107Wednesday, August 31, 2011 9:57 AMAnnouncements: 1. If you are joining the class for the first time today after passing the CS 101 competency exam, the course web site is: http:/bit.ly/uic107 2. See the videos of last week's lect
UCF - COP - 2273
08-31 Simple Java Programs CS 107Wednesday, August 24, 2011 12:57 PMCS 107 Fall 2011 Page 1CS 107 Fall 2011 Page 2CS 107 Fall 2011 Page 3CS 107 Fall 2011 Page 4CS 107 Fall 2011 Page 5CS 107 Fall 2011 Page 6
UCF - COP - 2273
09-02 Class Notes CS 107Friday, September 02, 2011 3:31 PMAnnouncements: - The link for &quot;Lecture Notes&quot; on the course web site has changed. - Note the links on the main page for the ASCII table and the Precedence table char firstInitial = 'D'; Remember:
UCF - COP - 2273
09-07 Class Notes CS 107Wednesday, September 07, 2011 2:41 PMAnnouncements: - Lab work is mean to be done during lab. It is posted ahead of time for you to be able to familiarize yourself with it only, not for you to do all the work ahead of time. Quest
UCF - COP - 2273
09-07 if statement in Java, CS 107Wednesday, August 31, 2011 12:35 PMCS 107 Fall 2011 Page 1CS 107 Fall 2011 Page 2CS 107 Fall 2011 Page 3CS 107 Fall 2011 Page 4CS 107 Fall 2011 Page 5CS 107 Fall 2011 Page 6
UCF - COP - 2273
09-09 Class Notes CS 107Friday, September 09, 2011 3:46 PMAnnouncements: I updated the sample code you can use for program #2 Questions? Last Time: if statements Today: if statements, continued The switch statement: a shortcut to multiple if-else statem
UCF - COP - 2273
09-09 if statement in Java, CS 107Wednesday, August 31, 2011 12:35 PMCS 107 Fall 2011 Page 1CS 107 Fall 2011 Page 2CS 107 Fall 2011 Page 3CS 107 Fall 2011 Page 4CS 107 Fall 2011 Page 5
UCF - COP - 2273
09-12 Class Notes CS 107Monday, September 12, 2011 1:16 PMAnnouncements: - Note new posting for lab this week - Java API link updated on website main page - I really do recommend you understanding the sample code given as part of program #2. Questions?
UCF - COP - 2273
09-14 Class Notes CS 107Wednesday, September 14, 2011 2:23 PMAnnouncements: - Program #2 is due tomorrow evening at 11:59 pm. Note that sample code has been updated online. How far along are you on your program? A - What program? B - just a bit C - at l
UCF - COP - 2273
09-16 Class Notes CS 107Friday, September 16, 2011 3:48 PMAnnouncements: Program #3 has been posted (still under construction) How did you do on the program? A: didn't get it B: Got just a part C: Got most of it D: Should get full credit E: Did extra cr
UCF - COP - 2273
09-19 Class Notes CS 107Monday, September 19, 2011 11:36 AMAnnouncements: 1. Program #1 has been graded. Check Blackboard for your grades. See the outstanding Program #1 examples. 2. Be sure to look at the program grading criteria in the syllabus before
UCF - COP - 2273
09-21 Class Notes CS 107Wednesday, September 21, 2011 10:15 AMAnnouncements: 1. See the Programs page for links to solutions to program #2 In particular see the version using methods, aligning the output in columns 2. See the Piazza posting for comments
UCF - COP - 2273
09-23 Class Notes CS 107Friday, September 23, 2011 2:47 PMAnnouncements: See updated description posted for program #3Questions? Last Time: Program swap.java used to swap the value of two variables Today: Parameter scope, overloading, classes intuition
UCF - COP - 2273
09-23 Scope example, CS 107Monday, September 19, 2011 2:08 PMCS 107 Fall 2011 Page 1CS 107 Fall 2011 Page 2
UCF - COP - 2273
10-03 Class Notes CS 107Monday, October 03, 2011 12:12 PMAnnouncements: Solution to in-class and in-lab midterm1 were posted Thursday. Grades to the in-class portion were emailed around earlier this afternoon. Program #2 has been graded, with comments p
UCF - COP - 2273
10-05 Class Notes CS 107Wednesday, October 05, 2011 1:08 PMAnnouncements: See a partial solution to the Tic-Tac-More problem. In particular pay attention to the implementation of the board and how this affects the adjacency checking. Think of how using
UCF - COP - 2273
10-07 Class Notes CS 107Friday, October 07, 2011 3:08 PMAnnouncements: Questions? Last Time &amp; Today: From last time see the date classes developed in lecture and posted online. Problems and [solutions], not necessarily in the following order. a. [Done]
UCF - COP - 2273
10-10 Class Notes CS 107Monday, October 10, 2011 3:58 PMAnnouncements: Program 4 has been posted, and is due in two weeks from yesterday. Take a look!Questions?Last Time: Objects and classes. Today: More on Objects and Classes (continued from last tim
UCF - COP - 2273
10-12 Class Notes CS 107Wednesday, October 12, 2011 2:26 PMAnnouncements: I added a link online under the Lab,TA,Tutoring page for the MERRP Supplemental Instruction (SI) resource. MERRP is on the 12th floor of SEO. I have to leave immediately after cla
UCF - COP - 2273
10-14 Class Notes CS 107Friday, October 14, 2011 4:06 PMAnnouncements: Questions?Last Time: Example of Objects &amp; Classes: EmployeeToday:Sample midterm #2 exam: When you create a class (so that the &quot;driver&quot; code works), you will likely need: 1. Instan
UCF - COP - 2273
10-17 Class Notes CS 107Monday, October 17, 2011 2:44 PMAnnouncements: 1. Make sure to sign up for advising this week. 2. Program #4 (WordLine): Remember that if input is invalid for any reason, you disable a line of characters and also deduct a point f
UCF - COP - 2273
10-19 Class Notes CS 107Wednesday, October 19, 2011 2:21 PMAnnouncements: Next week we have Midterm #2 in class Wed. and during lab Program #4 due this Sunday Questions? Last Time: Examples of arrays: counting charactersToday: Comments on Program #4: 1
UCF - COP - 2273
10-21 Class Notes CS 107Friday, October 21, 2011 1:39 PMAnnouncements: Next week we have Midterm #2 in class Wed. and during lab Program #4 due this Sunday Arrays Codelab problems extended until Sat. 10/22 at 11:59pm Questions? Last Time: Comments on pr
UCF - COP - 2273
10-24 Class Notes CS 107Monday, October 24, 2011 2:08 PMAnnouncements: 1. Midterm #2 in class Wed. and during your regular lab Tues/Wed this week. 2. The exam will only cover material up through what we discuss today in class, so most of the recursion p
UCF - COP - 2273
10-28 Class Notes CS 107Friday, October 28, 2011 4:00 PMAnnouncements: Program #5 should be out this weekend Grades have been posted online. Drop deadline is TODAY. Questions?Last Time: Midterm Exam Time before that: Arrays: Selection Sort Today: Array
UCF - COP - 2273
10-31 Class Notes CS 107Monday, October 31, 2011 2:31 PMAnnouncements: 1. Office Hours Wed shifted to 1:30. No office hours Fri. 2. Class Friday will be a video lecture. See the class notes entry on Friday before class for details. 3. Program #5 has bee
UCF - COP - 2273
11-02 Class Notes CS 107Tuesday, November 01, 2011 11:02 AMAnnouncements: No office hours Friday (11/4). Class on Friday will combine some online notes with part of an online video lecture. See the Friday notes (already posted) for this.Questions?Last
UCF - COP - 2273
11-4 Class Notes CS 107Tuesday, November 01, 2011 11:03 AMAnnouncements: No office hours today. Class is a video lecture, with the addition of resources listed below.Last Time: Recursion examples, 2 ways to do a trace of recursive code Today: Topic: Ar
UCF - COP - 2273
11-07 Class Notes CS 107Monday, November 07, 2011 2:09 PMAnnouncements: - See the online updates to program #5: partial credit for grading is given, along with suggestions on how to approach this problem one piece at a time. - Lab this week will again b
UCF - COP - 2273
11-09 Class Notes CS 107Wednesday, November 09, 2011 2:54 PMAnnouncements: In-class portion of midterm has been graded and emailed to you. See the updated overall grades online. Deadline for program #5 has been extended Anyone find an RCA mp3 player aft
UCF - COP - 2273
11-09 Maze ProblemMonday, November 07, 2011 12:47 PMCS 107 Fall 2011 Page 1CS 107 Fall 2011 Page 2CS 107 Fall 2011 Page 3CS 107 Fall 2011 Page 4CS 107 Fall 2011 Page 5
UCF - COP - 2273
11-11 Class Notes CS 107Friday, November 11, 2011 3:39 PMAnnouncements: For testing program #5 use 4 big words that overlap. Marisol after last class suggested: 5 Materialization Misdistribution Daydreaming Unconditional Yellow To play with the maze cod
UCF - COP - 2273
11-14 Class Notes CS 107Monday, November 14, 2011 2:12 PMAnnouncements: For lab this week you will be asked to modify the maze program, changing values in the maze as you go instead of using the cameFrom array. Program #5 is due ThursdayQuestions? .som
UCF - COP - 2273
11-16 Class Notes CS 107Wednesday, November 16, 2011 2:37 PMAnnouncements: Program #5 due tomorrow night at 11:59pm.Questions?Last Time: Recursion examplesToday: Comment on program Palindrome checker using recursion (developed in class) Linked list i