CSI 32 Introduction to Computer Programming II     

D01 (50442)

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

 
Date Class Materials HW assignment

Week 6
 
09/30

Lecture slides will be posted

source code: will be posted

Quiz 5, today at the end of the lecture, based on Recursion from Chapter 6 and Chapter 7 material we covered on September 23rd, can be found on the Blackboard
HW 6 (due date: Wednesday, October 7th)

1) will be posted

Suggested exercises
(not for grade, but the questions related to these will appear on a quiz or a test):
1) will be posted
09/29
Tuesday, but follows Monday schedule

Chapter 7 : Catching Exceptions
Chpater 8 : Pointers


Lecture slides will be posted

source code: will be posted

09/28 no classes

Week 5
 
You can see your grades here. Use the last four digits of your school id.
 
09/23 Chapter 7 Class Templates: array and vector; Catching Exceptions

Lecture slide

Meeting video recording

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, today at the end of the lecture, based on Chapter 6 (everything we covered from it during the previous week), can be found on the Blackboard
HW 5 (due date: Wednesday, September 30th)

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/21 Chapter 6 Functions and Introduction to Recursion (recursion)

Lecture slides

Meeting video recording

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



Week 4
 
You can see your grades here. Use the last four digits of your school id.
 
09/16 Chapter 6 Functions and Introduction to Recursion

Lecture slides


Videos:
1) Meeting video recording
2) Video recording of in-class practice 2 from the previous meeting

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

Quiz 3, today at the end of the lecture, based on Chapter 5, can be found on the Blackboard
HW 4 (due date: Wednesday, September 23rd)

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/14 Chapter 6 Functions and Introduction to Recursion
Sections 6.1 - 6.12

Lecture slides

Videos from the meeting:
1) lecture
2) in-class practice 1
We did in-class practice 2 problem in the next meeting. Here is the video recording:
3) in-class practice 2

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

Additional resources:
Codecademy: Functions

Week 3
 
You can see your grades here. Use the last four digits of your school id.

 
09/09 Chapter 5 Control Statements: Part 2, Logical Operators

Lecture slides

Recording of the meeting

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

Quiz 2, today at the end of the lecture, based on Chapters 3 and 4, can be found on the Blackboard

Additional resources:
Codecademy: Conditionals and Logic, Loops
HW 3 (due date: Wednesday, September 16th)

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/07 BCC is closed. Labor Day.

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

Lecture slides

1) video of the class meeting
2) video of the "study at home" material

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

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

Quiz 1, today at the end of the lecture, based on Chapter 2, can be found on the Blackboard

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

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
08/31 Chapter 3 Introduction to Classes, Objects, Member Functions and Strings

Be ready to use programming environment during the class meeting!

Lecture slides (typos are fixed!)

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

Training Quiz, today at the end of the lecture can be found on the Blackboard. Look under Week 2. Password: CSI32

1) Video of lecture
2) Video of the first in-class practice problem
3) Video of the second in-class practice problem + Blackboard quiz
4) Video for the third in-class practice, exercise 3.12 (the one we didn't do during our meeting)

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

Week 1
 
08/26 Chapters 1 and 2

Lecture slides

For those who missed our meeting or would like to review some moments:
1. Course organization: https://youtu.be/XNw3De_yyCA
2. Covering Chapters 1 and 2 (part 1): https://youtu.be/O6X_ysE4Ac8
3. Covering Chapters 1 and 2 (part 2): https://youtu.be/TkPnamkK6rI
4. Example 2 video recording (we didn't cover it during the meeting): https://youtu.be/lVsG57CklAc
5. Example 3 video recording (we didn't cover it during our meeting): https://youtu.be/AXjC01QdOQc
Remember that you can watch a youtube video at a higher speed (1.25, 1.5, 2, etc.)

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 Monday, 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 2nd: 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 9th:
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.