Needs updating or removing
Methods Assignment 2
Terms and Theory of Methods
In Computer Science 10 (CS10), students were introduced to structured programming. Structured programming refers to writing programs in one long, continuous sequence. The computer then executes the program in a line-by-line order. In CS20, we move into Modular Programming.
Some of the answers can be found in chapter 5 from the book Introduction to Computer Science by Carter or you can find them online.
Optional: You can view the chapter from here. Read all the way up to the end of Example 3. You should read but you do not need to write the code in the examples. .
String Method | Return Type |
.equals() | |
.toLowerCase() | |
.contains() | |
.charAt() | |
.trim() | |
.endsWith() |
11. Methods that return boolean values are usually used within what type of structure(s)?
12. Assuming site and web are Strings, the following line of code is valid:
site.toLowerCase().contains( web.substring( web.indexOf(“/”) , web.length() )
What type of value would the above line return?
Procedural Programming
By S. Couprie, 2009