Week 6 - Strings

Learning Objectives

Upon finishing this learning module, you should be able to:

  • Write programs that manipulate strings
  • Use the char data type and understand how it relates to int

Schedule

Day 1

In class:

  • Introduction to characters and strings

Out of class:


Day 2

In class:

  • String functions

Out of class:

  • Continue on Strings (Ch 9.7-9.10)
  • Start Ch 9 Exercise Set 1. (It focuses on 9.8)

Day 3

In class:

  • Getting work done with strings

Out of class:

  • Finish Strings (rest of Ch 9).
  • Start Ch 9 Exercise Set 2. (It focuses on 9.9-9.12)

Day 4

In class:

  • References

Out of class:



Characters

Read Ch 9.1-9.3 on Characters.

This optional video reviews the key info about chars:


Strings

Read the rest of Ch 9 on Strings.

There are two exercise sets at the end of the chapter. One focuses on using strings and string functions. The other focuses on using loops to work with each character in a string. It is much better to do part of each exercise set than to try to do all of one and none of the other. (Of course it is even better to do all of both!)

This important video shows what will happen in VSCode if you do something invalid with a string.

These other videos are optional - they review some of the ideas in the book chapter:

String basics (9.4 and 9.7):


Messy details about strings (9.5 and 9.6):


String functions (9.9-9.11):


Getting work done with strings - general tips about problem solving:


References

Read Ch 10.1-10.5 on References.

This optional video provides an overview of references: