CS1102 AY0708 Sem 1

If you're not failing every now and again, it's a sign you're not doing anything very innovative.
- W. Allen
In theory, there is no difference between theory and practice, but not in practice.
- Anon
Think twice, code once.
- Anon

Staff

Appointment Name Email Office
Lecturer Dr Tan Sun Teck tanst@comp.nus.edu.sg COM1-03-15
6516 2778
Tutor Hugo Willy dcshw@nus.edu.sg
Tutor Derry Tanti Wijaya g0600369@nus.edu.sg

Tutorials (Grp 1 and 2)

Tutorials start on Week 3 (27th Aug to 31st Aug).

Lectures

Java Revisit

Sorting

Labs

Tips

  • Dealing with weird “^M” characters in your file, say its named WeirdStuff.java. Run “dos2unix WeirdStuff.java WeirdStuff.java” in the Unix shell. This will overwrite your original file with a new one that does not contain the “^M” characters. If you want the new file to be written to a different file name then use “dos2unix WeirdStuff.java NewStuff.java”.
  • Do not create multiple instances of the Scanner/BufferedReader class
  • Write input for your programs into text files and use input redirection, eg. “java threeNPlus1 < td001.txt”, to pass the input to your program. This way you will be able to simulate how CourseMarker does the dynamic testing.
  • When you setup the lab exercises in CourseMarker it will create a testdata.txt file containing some sample input which you can use to test your program. Remember to create your own input file to test boundary conditions.

Workflow

  1. Setup the lab using the “setup” button in CourseMarker
  2. Login to sunfire using SSH Secure Shell Client
  3. Invoke the Secure File Transfer Client to transfer the .java file from the CMhome directory of the current lab to your Unix account
  4. Develop your program in Unix using one of the Unix editors, eg Vim, Emacs
  5. Test your program by creating your own test cases
  6. Use the Secure File Transfer Client to transfer the .java and .class file from your Unix account back into the appropriate directory inside CMhome
  7. Click on the “submit” button CourseMarker to submit your program

Alternatively you can see Max's guide of how to do your labs in Unix here

CourseMarker

Java

Vim

Unix

Online Resources

 
cs1102/start_0708_sem1.txt · Last modified: 2009/01/17 15:01 by melvin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki