CSI 32 Introduction to Computer Programming II     

D01 (31093)

Monday, Wednesday, 12:00 pm-1:50 pm, room Meister 320
 

 
Date Class Materials HW assignment

Week 6

You can view your grade in this Google spreadsheet.
Look in the row with the last 4 digits of your CUNY ID (emplid).
10/04-05 no classes, Yom Kippur
10/03 Chapter 7 : Catching Exceptions
Chapter 8 : Pointers


Lecture slides

source code: exceptionsHandling_1.cpp, pointersExample1.cpp, pointersExample_2.cpp


Week 5

You can view your grade in this Google spreadsheet.
Look in the row with the last 4 digits of your CUNY ID (emplid).
09/29 Thursday runs by Monday schedule

Chapter 7 Class Templates: array and vector; Catching Exceptions

Lecture slides

source code: arraysExample.cpp, arraysExample2.cpp, arraysExample3.cpp, arraysExample4.cpp, vect1.cpp, vect2.cpp, vect3.cpp, vect4.cpp

In-class work: see slides
Solutions: in-classWork.cpp , in-classWork2.cpp

Quiz 4, based on Chapter 6 topics will be on Monday, October 3rd.
HW 5 (due date: Friday, October 7th)

1) Exercise 6.41
2) Exercise 7.13
3) Exercise 7.14
4) Exercise 7.28
Send your homeworks to natna20@gmail.com

Self-Study:
1) Read Section 6.19: Order of Evaluation of Operands
2) Read Section 6.20

Suggested exercises
(not for grade, but the questions related to these will appear on a quiz or a test):
1) Chapter 6, Summary and all Self-Review Exercises
2) Chapter 6, Exercises: 6.40
3) Chapter 7, Summary and all Self-Review Exercises
4) Chapter 7, Exercises: 7.6 - 7.9, 7.11, 7.12, 7.17, 7.20
09/28 Chapter 6 Functions and Introduction to Recursion (recursion)

Lecture slides

source code: recFib_1.cpp, iterativeFib.cpp, rec_Fib_2.cpp, factorial.cpp

In-class work: see slides, and the draft: HanoiTower_draft.cpp
Solution: HanoiTower.cpp




Tutoring Lab for CSI 30, 31, 32, 33, 35:
Online: (visit Blackboard -> BCC online tutoring at the top right corner)
      Monday 11 am - 2 pm
      Tuesday: 11 am - 3 pm

In-Person:
(Appointments are required for in-person support via  WCOnline )
      Wednesday: 2 pm - 8 pm
      Thursday: 11 am - 2 pm; 6 pm - 8 pm

Week 4

Note that on Monday-Tuesday, September 26-27th, there are no classes scheduled at BCC - Rosh Hashanah
Thursday, September 29th will run on Monday schedule


You can view your grade in this Google spreadsheet.
Look in the row with the last 4 digits of your CUNY ID (emplid).
 
09/21 Chapter 6 Functions and Introduction to Recursion

Lecture slides

source code: refParameters.cpp, defaultParameters.cpp functionOverloading.cpp unaryScope.cpp templateFunctionExample.cpp

Quiz 3, today at the end of the lecture, based on Chapter 4 and 5 topics
HW 4 (due date: Friday, September 30th)

1) Exercise 6.31
2) Exercise 6.33
3) Exercise 6.49
4) Exercise 6.51
Send your homeworks to natna20@gmail.com

Self-Study:
1) Read Sections 6.7 - 6.8

Suggested exercises
(not for grade, but the questions related to these will appear on a quiz or a test):
1) Chapter 6, Summary and all Self-Review Exercises
2) Chapter 6, Exercises: 6.11, 6.16, 6.17, 6.18, 6.46, 6.53
09/19 Chapter 6 Functions and Introduction to Recursion
Sections 6.1 - 6.12

Lecture slides

source code: Prototypes.cpp, RandomNumbersExample.cpp, scopesExample.cpp, scopesExample2.cpp, inlineFunctions.cpp

In-class work: see slides
Solutions: SomeFunctions.h, SomeFunctions.cpp, someFunctionsTesting.cpp; reverseNumber.cpp

Quiz 2, today at the end of the lecture, based on Chapter 3 topics

Additional resources:
Codecademy: Functions

Week 3

You can view your grade in this Google spreadsheet.
Look in the row with the last 4 digits of your CUNY ID (emplid).
 
09/14 Chapter 5 Control Statements: Part 2, Logical Operators

Lecture slides

source code: forLoop.cpp, outputFormatting.cpp, stringExample.cpp, switchExample1.cpp, switchExample_2.cpp, doWhileExample.cpp,

In-class work: see slides and Exercise 5.19
Solutions: switchInClassWork-answer.cpp, Exercise5_19.cpp

Additional resources:
Codecademy: Conditionals and Logic, Loops
HW 3 (due date: Friday, September 23rd)

1) Exercise 5.13
2) Exercise 5.16
Send your homeworks to natna20@gmail.com

Suggested exercises
(not for grade, but the questions related to these will appear on a quiz or a test):
1) Chapter 5, Summary and all Self-Review Exercises (pages 203-205)
2) Chapter 5, Exercises: 5.9, 5.10, 5.22, 5.23
09/12 Chapter 4 Algorithm Development and Control Statements: Part 1

Plan for today:
  • We didn't finish Chapter 4 and therefore will resume 27
Lecture slides

source code: refinementExample_pseudocode.cpp, increment.cpp
refined code: refinementExample.cpp

In-class work: exercise 4.28
Solution: binaryToDecimal.cpp

Additional resources:
Codecademy: Conditionals and Logic, Loops

Week 2
 
09/07 Chapter 4 Algorithm Development and Control Statements: Part 1

Plan for today:
  • We didn't finish Chapter 3 and therefore will resume with a discussion about exercises 3.9 and 3.14, and will work on exercise 3.12
  • begin covering Chapter 4, Lecture slides
Afterclass updates:
We stopped at slide 26 and will resume on Monday



source code: danglingElseExample.cpp, refinementExample_pseudocode.cpp, increment.cpp
refined code: refinementExample.cpp

In-class work: exercise 4.28
Solution: binaryToDecimal.cpp

Quiz 1, on Monday, September 12th, at the end of the lecture, based on Chapter 2

Additional resources:
Codecademy: Conditionals and Logic, Loops
HW 2 (due date: Monday, September 19th)

1) Exercise 3.10
2) Exercise 3.13
3) Exercise 4.27
4) Exercise 4.37
Send your homeworks to natna20@gmail.com

Suggested exercises
(not for grade, but the questions related to these will appear on a quiz or a test):
1) Chapter 3, Summary and all Self-Review Exercises (pages 95-100)
2) Chapter 3, Exercises: 3.5 - 3.8
3) Chapter 4, Summary and all Self-Review Exercises (pages 141-147)
4) Chapter 4, Exercises: 4.11, 4.12, 4.21, 4.23, 4.32
09/05 BCC is closed. Labor Day.

Week 1
 
08/31 Chapter 3 Introduction to Classes, Objects, Member Functions and Strings

Be ready to use programming environment during the class meeting!

Lecture slides

source code from the book: Account.h, AccountTest.cpp,
modified code: Account2.h, AccountTest2.cpp

Afterclass comments:
we stopped on the slide 16, and began looked at Account2.h file.

In-class work: exercises 3.9, 3.14; 3.12
Answers: Exercise3_9.cpp, Account3_exercise3_14.h (only the header), 3.12: Date.h , DateTest.cpp

Additional resources:
Codecademy: Classes & Objects
Not for grade, do not submit your work, but please do it:
1) Look at the files account2.h and AccountTest2.cpp - this is one project. Read all comments, build and run the solution/project.
2) Then, proceed to slide 17 and try to work on the exercise 3.9.
The solution can be found here: Exercise3_9.cpp
3) Then proceed to the slide 18 and try to wor on exercsise 3.14.
The solutuion can be found here: Account3_exercise3_14.h (only the header)
Your goal for both of these exercises is to understand how everything works, what functions are used, and how all "changes/updates" were implemenented.

On Wednesday we will resume with a discussion about exercises 3.9 and 3.14 and proceed to work on exercise 3.12
08/29 Chapters 1 and 2

Lecture slides


source code: Example1.cpp, Example2.cpp, Example3-operators.cpp

Announcements:
First two chapters of the book are available through e-reserves:
http://bcc-cuny.libguides.com/er.php?b=c
Choose CSI32 from the list

Additional resources:
Codecademy: Hello World and Variables ; Conditionals & Logic has a little bit more that what we covered, but if you have time, go ahead and do it.

You can also enroll into the edX C++ course from Microsoft (free withouth the certificate, select Audit this course)

Udemy has C++ Tutorial for Complete Beginners (free)

edX and Udemy's courses seem to have more information about C++ in them.
HW 1:

due Wednesday, August 31st:
1) Chapter 2, Summary and all Self-Review Exercises (pages 64-67) - not for grade, but the questions related to these will appear on a quiz and test.
2) Chapter 2, Exercises (pages 68-69): 2.7 - 2.15 - not for grade, but the questions related to these will appear on a quiz and test.

due Wednesday, September 7th: both programming assignments will be graded
1) Chapter 2, Exercise 2.25 on page 70
2) Write a program that reads in three integer numbes from the keyboard, then
  • determines and prints the largest and the smallest integers in the group (use only the programming techniques you learned in Chapter 2),
  • determines and prints whether each number is odd or even (hint: use the remainder operator %)

Please remember:
  • All homeworks have the due date and must be submitted by the midnight of the due date. Late homeworks are not accepted.
    Example: if the due date is September 23rd, then the latest time for the submission is 11:59 pm on September 23rd.

  • When submitting your homework via e-mail:
    1. put HW number in the Subject field, for example: HW 01
    2. attach all the source file(s)(with the extention '.cpp' or the extention '.h'), and, when needed, a file with the input and output of your program(s)
    3. your program must run (no syntax errors!)
    4. your code must be well-commented
    5. when I send you back a reviewed homework submission with comments and allow to re-submit your program, do so as Reply; do not compose a new e-mail message.

  • All homeworks must be done on your own. No group work, no copying.

  • Several of the worst homeworks will be dropped.
due Wednesday, September 7th:
Read Chapter 1, sections 1.1 - 1.9, 1.11 - 1.14- not for grade, but the questions related to these will appear on a quiz.