Introduction to Computer Programming (CS 1302) - Fall 2013

People


    Instructor: Yang, QingXiong (qiyang at cityu.edu.hk; Office: Academic Building, Y6638)
    Tutorial Assistant 1: LEUNG, Ho Yin (hyleung96-c@my.cityu.edu.hk, Wednesday 11:00 - 11:50)
    Tutorial Assistant 2: SHEK, Tsz Lung (tlshek2-c@my.cityu.edu.hk, Tuesday 17:00 - 17:50)

Announcements


0: Project 4 is ready, see the end of this webpage for details.
1: Quiz 2 in April 16, 9-11 am in AC1 G5-317 (Week 13's lecture), closed-book.
2: Final Exam in May 12, 2-4pm, LT-3, closed-book.

Key Info.


    Syllabus:http://eportal.cityu.edu.hk/bbcswebdav/institution/APPL/Course/Current/CS1302.htm
    Lecture:Wednesday 9:00 - 10:50 at AC1 G5-317
    Tutorial 1:Wednesday 11:00 - 11:50 at AC2 5503
    Tutorial 2:Tuesday 17:00 - 17:50 at AC2 5503
    Office Hours: Wednesday 14:00 - 17:00 in my office (AC1 Y6638).
    Random Student Picker: link

Online Resources


Online Tutorials

    HTML Tutorial: http://www.w3schools.com/html/html_intro.asp
    JavaScript Tutorial: http://www.w3schools.com/js/js_intro.asp

Programming environment/Debugging

    SharePoint Designer 2007: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21581
    Visual Studio 2008: http://www.microsoft.com/en-us/download/confirmation.aspx?id=7873
    Debugging Script: http://msdn.microsoft.com/en-us/library/dd565625%28v=vs.85%29.aspx#_start

Others

    HOT Questions: http://www.cs.cityu.edu.hk/~qiyang/courses/cs1302/hotq.html
    Wiki: http://zh.wikipedia.org/wiki/JavaScript

Class Schedule (subject to change)


    DataTopicReading/Lecture NotesLecture Exercise Exercise Solutions
    Week 1
    Introduction to Computer & Programming Slides:
    Course Info.,
    Overview of JavaScript
    Source Code: Code Samples
    (NULL) (NULL)
    Week 2
    Program Structure I Slides: 2ProgramStructureI.pdf,
    Source Code: Code Samples
    Questions: LectEx02.pdf Solutions:
    LectEx02_solution.pdf,
    Source Code: Given Code
    Week 3
    Questions: LectEx03.pdf Solutions:
    LectEx03_solution.pdf,
    Given Code.
    Week 4 (NULL) (NULL)
    Week 5 Program Structure II Slides: Lec04_ProgramStructureII.pdf,
    Source Code: Code Samples
    NULL. NULL.
    Week 6 Quiz 1. Analysis on Quiz 1 (NULL) (NULL)
    Week 7 Program Structure III Slides: 4ProgramStructureIII, 4ProgramStructureIII-cont
    Source Code: Code Samples
    (NULL)
    Week 8 Program Structure IV Slides: ProgramStructureIV
    Source Code: Code Samples
    (NULL) NULL.
    Week 9 JavaScript Global Functions and Objects I Slides: FuncObjI.pdf
    Source Code: Code Samples
    Questions: LectEx08.pdf Solutions:
    1. LectEx08_solution.pdf,
    2. Q1: FloatingPoint.
    Week 10
    Week 11 JavaScript Global Functions and Objects II Slides: FuncObjII.pdf
    Source Code: Code Samples
    Questions: LectEx11.pdf Solutions:
    Lec11_solution.pdf
    Week 12 Questions: LectEx12.pdf Solutions:
    Lec12_solution.pdf
    Week 13 (NULL) (NULL)

Tutorials


    Tutorial No.Tutorial Tasks Tutorial Solutions
    1: FTP server Start Project 1: a personal website. (Due: Week 13, Sunday 23:59)
    Guidelines for setting up personal homepage:
    1) Video; 2) PDF; 3) Example (right click on the link and choose save as); 4) Password problem
    (NULL)
    2: from HTML to Javascript Tasks: PDF
    Supplementary material: Tut02.html, CS1301.gif
    Solution to:
    Task 1, 2, 3
    3: innerHTML ⋅ parseInt ⋅ summation (+) and -, *, / create a form with textbox, functions Tasks: PDF
    Result: Video.
    Supplementary material: Tut02_MarkCalc.html,
    Solution to:
    Task 1
    Task 1, 2
    4: innerHTML, pseudo-URL, function, parseInt, numbers and arithmetic operators Tasks: PDF
    Supplementary material:
    Template
    Solution:
    Tut05_ClickableCalculator_Solution.html
    5-6: Equality Operator (= =), Assignment Operator (=), AND (&), Global variable, if .. else statement, return statement, true/false Tasks: PDF
    Supplementary material:
    Template, tic-tac-toe (wiki explanation), Winning Strategies, Quiz 1.
    Solution:
    Tut04_TicTacToe_Solution.html
    7: Use of random numbers, Color codes, onkeyup and onload events Tasks: Tut07.pdf
    Supplementary material: Tut07_GuessBlue.html
    Tut07_RGB_Combination.html
    Solution to:
    Task 1, Task 2
    8: Change image source, setInterval Tasks: Clock Animation.pdf
    Supplementary material:
    Task 1
         a) Template: Tut07_Task1.html
         b) Images: 12LongArms.zip
    Task 2
         a) Template: Tut07_Task2.html
         b) Images: 12ShortArms.zip
    Images for Optional Task
        Additional pictures for 60 minsec.zip
    Solution to:
    1. Required Task 1,
    2. Required Task 2,
    3. Optional Task 1,
    4. Optional Task 2
    9: Repetition structure (while loop and for loop) Tasks: Picture_Gallery.pdf
    Supplementary material:
    1. Template to start with
    2. images
    Solution to:
    1. Required Task,
    2. Optional Task 1.
    10: Random number generation, Math object methods, dynamic movement of HTML elements Tasks: Tut09.pdf
    Supplementary material:
    1. Template and images
    Solution to:
    1. Required Task,
    2. Optional Task,
    11: Using the Date object Tasks: Tut10.pdf
    Supplementary material:
    1. Tut10_template.htm
    2. CHIMES.WAV
    Solution to:
    1. Task 1,
    2. Task 2.
    12: Using the Date object 2 Tasks: Readme
    (NULL)


Two Quizzes (in the lecture)


    Quiz 1 (Week 6, Feb. 26, about 30 minutes, in the lecture)
    Quiz 2 (Week 13, about 50 minutes, in the lecture)

Four Projects


    Project 1: Personal Website Project 2: Gambling Game (Step 1)
    (Due: Week 13, April 20, Sunday, 23:59)(Due: Week 7, Sunday, March. 9, 23:59)
    Project 3: Gambling Game (Final Step)
    (Due: Week 12, Sunday, April 13, 23:59)

    Project 4: How old are you?
    (Due: Week 13, Sunday, April 20, 23:59)

University requirement on academic honesty


Violations of academic honesty are regarded as serious offences in the University. Acts such as plagiarism and fabrication of research findings can lead to disciplinary action. Most commonly the penalty is failure in a course, but in the most serious cases expulsion from the University and debarment from re-admission may occur.