Questions
Answer the following questions to test your knowledge of this chapter:
- What do you call a method that has no parameters?
- What do you call a method that has one parameter?
- What do you call a method that has two parameters?
- What do you call a method that has three parameters?
- What do you call a method that has more than three parameters?
- Which two method types should be avoided and why?
- In layman’s terms, what is FP?
- What are some advantages of FP?
- Name one disadvantage of FP.
- What is WET code, and why should it be avoided?
- What is DRY code, and why should you use it?
- How do you dry out WET code?
- Why should methods be as small as possible?
- How do you implement validation without having to implement
try
-catch
blocks?