Difference between revisions of "IB Computer Science 2"

From WLCS
Line 12: Line 12:
 
*# Write a method: '''void matrixPrint(double[] m)'''
 
*# Write a method: '''void matrixPrint(double[] m)'''
 
*#* Print each row on a separate line, and each element should be separated by a space
 
*#* Print each row on a separate line, and each element should be separated by a space
*# Write a method (function): '''double[] matrixAdd(double[] m1, double[] m2) that returns a new matrix that is the sum of m1 and m2
+
*# Write a method (function): '''double[] matrixAdd(double[] m1, double[] m2)''' that returns a new matrix that is the sum of m1 and m2
 
*#* Be sure to check if the two matrices are the same size (if not, then return null)
 
*#* Be sure to check if the two matrices are the same size (if not, then return null)
 
* Nested Loops, Processing & Images
 
* Nested Loops, Processing & Images

Revision as of 05:59, 9 October 2018

Tuesday (10/9/18)

Agenda:

  • Demo Media:BubbleSort.java
  • Algorithms Identification Quiz in Canvas
  • Reference variables overview
  • Two-Dimensional Arrays and Nested Loops
    1. Accessing all of the individual elements of a two-dimensional list
    2. Prompt the user to construct a two-dimensional list
      1. Prompt for the number of rows
      2. Prompt for the number of columns
      3. Prompt the user for each number in the two-dimensional list
    3. Write a method: void matrixPrint(double[] m)
      • Print each row on a separate line, and each element should be separated by a space
    4. Write a method (function): double[] matrixAdd(double[] m1, double[] m2) that returns a new matrix that is the sum of m1 and m2
      • Be sure to check if the two matrices are the same size (if not, then return null)
  • Nested Loops, Processing & Images

Thursday (10/4/18)

Agenda:

  • Make sure you've completed Selection Sort in repl.it
    • Mr. Bui will be manually looking at your repl.it submissions too
  • Take the Sorting Identification Quiz in Canvas
    • The access code is ...
  • Bubble sort review
  • Complete and demo Media:BubbleSort.java

Tuesday (10/2/18)

Warmup:

  • Take the Abstract Data Structures Pre-assessment on Canvas
    • Do not guess answers, skip them if you do not know the answer
  • Complete the Find Minimum & Maximum repl.it

Agenda:

  • Group sorting activity
    1. Form 3-4 person groups
    2. Receive playing cards
    3. With your group, document an algorithm (steps) of how you sort the cards out
  • Introduction to Sorting
  • Selection sort assignment in repl.it

Archives