CS1102 AY0607 Sem 1

Programs must be written for people to read, and only incidentally for machines to execute.
- H. Abelson and G. Sussman
Computer Science is a science of abstraction - creating the right model for a problem and devising the appropriate mechanizable techniques to solve it.
- A. Aho and J. Ullman
Good teaching is more a giving of the right questions than a giving of the right answers.
- J. Albers

Staff

Appointment Name Email Office
Lecturer Dr Tan Sun Teck tanst@comp.nus.edu.sg S16-08-05
6516 2778
T3, T4, T5 Tutor Tan Huiyi Max tanhuiyi@comp.nus.edu.sg S15-03-07
6516 4364
T1, T2, T6 Tutor Zhang Zhiyong Melvin melvin@comp.nus.edu.sg S15-03-07
6516 4364
B1 Lab TA Dinh Thanh Tu dinhthan@comp.nus.edu.sg
B2 Lab TA Wu Xiandan wuxianda@comp.nus.edu.sg
B3 Lab TA Do Huy Hoang dohuyhoa@comp.nus.edu.sg
B4 Lab TA Duong Hinh Bao duonghin@comp.nus.edu.sg
B5 Lab TA Nguyen Thi Ngoc Phuong Thuy nguyen12@comp.nus.edu.sg
B6 Lab TA Nguyen Viet Bang nguyenv3@comp.nus.edu.sg
B7 Lab TA Li Jiaqi lijiaqi@comp.nus.edu.sg

Lectures

Java Revisit

Stack and Queue

Sorting

Trees

Tutorials

Presentation

For students in T1, T2 and T6, please find your number in the namelist below. Suppose your number is N and next week we are working on tutorial K which has M questions, the question you should be preparing to present is (N + K) mod M, where A mod B is the remainder when A is divided by B

For example, suppose next week is tutorial 2 and you are student number 5 in the list and there are 4 questions in the tutorial. You should prepare question number (5 + 2) mod 4 = 7 mod 4 = 3. If the remainder is 0, this means you should prepare question M.

Namelists

Slides

Labs/PE

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_0607_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