Introduction to Computer Programming I - CS 140
Claudia Roda - AUP

Home TextBook Syllabus Online references Prof. Home My grades

no news for the moment

 

Date Content Assignments
Week 1 - 16/1
Please note that some of the listings printed in your book (especially in the first two chapters) are wrong. Please refer to the code section in the CD rom (or on the Web site)

Chapter 1
Exercises: 1.4, 1.6, 1.8, 1.12-13, 1.15-16, 1.18, 1.20
Programs: 1.1- 4, 1.8

Week 2 - 23/1

Chapter 2
Exercises:
2.2-7, 2.10, [2.15, 2.17]
Programs: 2.2-3, 2.5-7, 2.10, [ 2.12-13, 2.16, 2.19-20]

Week 3 - 30/1

For input remember:

  1. declare a scanner: Scanner s = new Scanner(System.in)
  2. Tell  the user what you expect. Example System.out.println(“please enter a number”)
  3. Read the input from the keyboard and store it in a variable: e.g. int x = s.nextInt();or String str = s.nextLine(); etc.
Week 4 - 6/2 Chapter 3
Exercises:
3.1-4, 3.7, 3.11-12
Programs: 3.3, 3.5-6
Week 5 - 13/2
Week 6 - 20/2 Chapter 4
Exercises:
4.1, 4.3-4, 4.6, 4.10
Programs: 4.1, 4.4-5, 4.7-9, 4.12-14, 4.16
 
Spring break: 27 February - 9 March
Week 7 - 12/3 Chapter 5
Exercises:
5.1-5, 5.7-12, 5.14, 5.16-19, 5.21-22, 5.24, 5.26-27, 5.29-31, 5.35
Programs: 5.1-2, 5.8, 5.11, 5.16, 5.18, 5.22, 5.27, 5.32, 5.37, 5.39, 5.41
Week 8 - 19/3
Week 9 - 26/3
  • Conditional Loops
  • Classic cycle for command line input (ppt, SampleInputCycle.java), modify the code so that users can also multiply and divide;
  • Exercises in class with conditional and loops
  • REMINDERS:
    String s1 ="hello", s2="hello";
    if (s1==s2) System.out.println("the strings are equal);

    WILL NOT PRINT "the strings are equals" - the two objects are compared and they are different objects
    if you want to compare the content of the two strings you need to use: s1.equals(s1)

    The compiler will give you an error if you try to declare a variable twice; for example the following IS WRONG:
    int i,j;
    int i = scan.nextInt(); //WRONG

    Do not place semicolons after loop conditions; for example the following IS WRONG:
    while(x!=0); WRONG
    for(int i =0; i<x; i++); WRONG

Week 10 - 2/4  
 
9 April - Easter monday
 

Week 11 - 12/4

Thursday only

Chapter 6
Exercises:
6.1-5, 6.10-11, 6.15-16
Programs: 6.1-9
Week 12 - 16/4 Chapter 7
Exercises: 7.1 to 7.10
Programs: 7.1 - 7.8, 7.10
Week 13 - 23/4  

Week 14 - 30/4

Monday only

Review and exam preparation: Final exam preparation  
9-15/5 Exam - exact date to be announced