CIS 207

Module 1

Task 1 read ch1/ch2, install IDE, lesson/task report, hello world problem

Lesson 1: IIPD, Demo program, JOPTIONpane, raptor install, sequencing, selection and iteration

Discussion: intros

Module 2

Task 1

Lesson

Discussion

Module 3

Task 1

Lesson

Discussion

Module 4

Task 1

original lesson:1) Work in groups to brainstorm about a simple Java program that uses selection control structure to test whether the value of the side of the square entered by the user is greater than zero, and then calculates the area of the square and produce the results only if the entered value is greater than zero.


2) Work individually to create the program discussed in (1), compile and run the program using Eclipse. Students then work together to resolve errors (if any).


3) Work in groups to brainstorm about a simple Java program that calculates the area of three different square three times by allowing the user to enter a different value for the side of the square each time.


4) Work individually to create the program discussed in (1), compile and run the program using Eclipse. Students then work together to resolve errors (if any).


5) Students brainstorm in groups to create two methods; one calculates the sum of two integers and return the value and the second calculate the square root of the sum and produce the results. The students then work individually or in groups to create, compile and run a program that utilizes both methods
Assessment:
Students work in groups to create a program that uses three methods; the first method allows the user to re-enter the radius of a circle as long as the value entered is less than 1. The second method calculates the area of a circle for the entered radius. The third method output the result based on the following criteria: if the area of the circle is greater than 10, the program output a message to indicate that the calculated area is small. Otherwise, an Output message will indicate that the area is big.





Discussion

Module 5

Task 1

Lesson

Discussion

Module 6

Task 1

Lesson

Discussion

Review: flowchart, go from flowchart to code example, Variable types, input and output (JOptionaPane)

walk thru one problem from start to finish

Review Selection problems

Iteration Reivew

  1. Write a program that asks the user for her name and greets her with her name.
    
  2. Modify the previous program such that only the users Alice and Bob are greeted with their names.
    
  3. Write a program that asks the user for a number n and prints the sum of the numbers 1 to n
    
  4. Modify the previous program such that only multiples of three or five are considered in the sum, e.g. 3, 5, 6, 9, 10, 12, 15 for n=17
    
  5. Write a program that asks the user for a number n and gives him the possibility to choose between computing the sum and computing the product of 1,…,n.
    
  6. Write a program that prints a multiplication table for numbers up to 12.
    
  7. guessing game where the user has to guess a secret number. After every guess the program tells the user whether their number was too large or too small. At the end the number of tries needed should be printed. I counts only as one try if they input the same number multiple times consecutively.
    

methods, file input/output, method overloading, objects, classes,

click to edit