String Lab
String-1
- This lab will use the standard C++ string class
- Create four string variables
- Initialize the first string to "No more school"
- Initialize the second string to "No more books"
- Initialize the third string to "No more teacher's dirty looks"
- Concatenate the three strings into the fourth string
- Output your poem to the screen in a nice-looking format
String 2
- Use the standard C++ string class
- Create a program that will let the user enter the names of their seven classes
and their teachers for those classes
- Display the data back to the screen
String Enrichment #1
- Create two string variables holding the values "Hello" and "Dolly";
- Use the subscripting feature described in String Example #2 to change it
to Jello Molly.
- Display the data to the screen before and after the changes
String Enrichment #2
- Create a program that will let the user input their first, middle and last
name
- Before you display the name to the screen, change the first character of
each part of their name of a different letter
- Ask the use if the information is correct
- If the user wants to change the data, allow her to re-input the data, overriding
your changes.
- Concatenate the strings into one name and display to the screen