Lab 3: Putting Classes Together Lab 4: Inheritance and Interfaces Project 2: ADTs: Arrays, Linked Lists and Trees Lab 7: Android SDK and Eclipse Lab 7: Download Android SDK (Windows) |
CS251: Intermediate Programming with JavaCourse InformationLab Instructor: Matthew Fricke Email: mfricke@cs.unm.edu Website: cs.unm.edu/~mfricke Mailing List: Subscribe to cs251f12@cs.unm.edu Office: Farris Engineering Center Room 126 Office Hours: Monday 1:00-2:00pm and Thursday 9:30-10:30am. Grading: Your lab grade is based on quizzes and small programming assignments and is worth 15% of your final grade in CS251. Towards the end of the semester you will be working on projects assigned by Prof. Kelley during lab. Those projects are worth 45% of your final CS251 grade. So work you do in lab altogether makes up 60% of your grade for the course - DON'T SKIP LAB. Lab section 2 is taught by Jan Monterrubio his website is here http://www.cs.unm.edu/~jmonter/CS251/F12/. Jan and I will be assigning the labs and grading together so feel free to go to either of our office hours. Tips: "Keep a safe place to stand" - write your programs incrementally, work on one small part at a time. Only move on to the next when you are sure the code you have written so far works exactly as you expect. "Be lazy" - write each part of your program assuming the methods you use all work properly. Even though many of those methods will be written by you at a later time. This is just another way of saying abstract away the complexity by only thinking about the structure of one part of your program at a time. This is why programming languages have methods and classes. "Practice makes perfect" - like every other task programming requires practice to get better. "Use your brain to write code not the compiler" - it is tempting to write code, compile, look through the compiler errors and fix each line and then repeat. It is harder but much better to really think about your code before compiling so you don't end up with code that compiles but you don't really understand why. "Don't steal" - using other people's code is essential for all programmers. In a university course where you are being evaluated for a grade it is very important that you do your own work, in industry stealing code will get your company sued. You can seek help from other students, books, and the internet but don't copy code without attribution. If your code looks like another student's we will likely believe you are both cheating even if they look the same because you got the code from the same internet site. There is nothing wrong with taking code from the internet just make sure you say so in a comment. CS251 TA and CS Tutors Schedule Fall 2012Monday Tuesday Wednesday Thursday Friday Saturday If these hours don't work for you, you can send an email to either one of the CS251 Ta's or to the CS Tutor email (csundergradhelp@cs.unm.edu) and schedule some time to get the help that you need.
First do the following two thingsSend me an email with Subject: CS251 [your lab section] [your name] Sign up for the class mailing list above The goal of this lab is to make sure you can write, compile, and run a java program in the lab environment. The java program you will write is called WordPlay. Tools: Secure Telnet (ssh client), XMing (X11 Server), Ubuntu Precise Pangolin (linux), a linux text editor of your choice, javac (Java compiler), java, and JavaDocs (Java Reference). Connecting to Linux
WordPlaySpecification: Wordplay takes text as an argument, performs three operations on that text, and prints the result of each operation. WordPlay prints an error message and exits if the input is not correct. Input: a single word of text containing letters only Output: prints the result of applying stringDouble, stringReverse, and stringInvertCase OperationsstringDouble(): takes a string and returns a new string with each letter repeated once. stringReverse(): takes a string and returns a new string with each letter in reverse order. stringInvertCase(): takes a string and returns a new string with with each capital letter replaced with a lowercase letter and each lowercase letter replaced with a capital letter. Examplejava Wordplay ExampleText EExxaammpplleeTTeexxtt txeTelpmaxE eXAMPLEtEXT Program Skeletonpublic class WordPlay{ /** * Duplicates the characters within a particular string and returns a String with the duplicated characters of the original string. * @arg TODO What is being passed into the method? * @return the String containing duplicated characters from the original string */ private static String stringDouble(String s){ //TODO duplicate the characters here return s; } /** * Reverses the characters of a particular String and returns the reversed character String. RequirementsSend me an email with Subject: CS251 SIGN UP FOR THE CLASS mailing list Submit "WordPlay.java" (see below for submission instructions) You must have ONE method (or function) per operation.Your main() method must show all three operations being used with the same input text Have comments in your program Use WordPlay to read a string from the command line. If No argument is passed to the command line or more than one argument is passed, your program must exit (ie System.exit(1) ) with a NON-ZERO value Your program output must look something like this, input given ABCedFGAABBCCeeddFFGG GFdeCBA abcEDfg Grading75% Meets Requirements Tips
READ THE WHOLE LAB BEFORE STARTING Submissions
For this week's lab, you must do two things: Lab 2: Writing ClassesSeptember 4th, 2012BackgroundClassification of birds was one of Charles Darwin's favorite hobbies. Tweeter, the newly founded social network has hired you to create a database of birds. Tweeter is interested in the sounds birds make, and whether or not they're correlated to the color of their feathers or whether the pitch is determined by the bird's ability to fly. Requirements
You will also want to write a "driver" program. This program contains your main() function and you will use it to test your Bird class. When we grade your lab we will write our own driver, compile it with the Bird.java you submit and use it to perform some tests. We will not grade your driver program. GradingTipsSubmissions |