{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

10-20 Class Notes CS 107 - 10-20 Class Notes CS 107...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements: Remember that midterm #2 is next week, in lab, and in class next Friday Sorry, but grades not yet ready to be posted. Maybe tonight? Questions? Last Time: Mostly comments on program #4 Today: Other Approaches to Sorting Arrays examples: Searching, Command line args, Dynamic Array using ArrayList, Multidimensional array See other approaches to sorting given online on the course web site: http://people.cs.ubc.ca/~harrison/Java/sorting-demo.html A funny thing happened to me the other day… 15 32768 14 16384 13 8192 12 4096 11 2048 10 1024 9 512 8 256 7 128 6 192 5 160 4 144 3 152 2 148 1 146 0 145 Binary Search 10-20 Class Notes CS 107 Wednesday, October 20, 2010 2:40 PM 107 Fall 2010 Page 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Binary Search 107 Fall 2010 Page 2
Image of page 2
/** * Show how we can retrieve command line arguments within the program */ import java.io.*; class CommandLineArgs { public static void main(String[] args) { System.out.println("Command line args are:"); int argsSize = args.length; for (int i=0; i<argsSize; i++) { System.out.println("[" + i + "]: " + args[i]); if (args[i].equals("tough")) { System.out.println("OK, starting the chess program in super-
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern