Help on isValid
- Use a constant for the required length of a string
- if the string sent the method is not the right length, return false
- Assume the string is valid
- for each character in the string
- if the character is not a valid color
- know that the string is no longer valid (and will NOT become valid again)
- return if the string was determined valid or not
This topic: CenterForComputing
> WebHome >
Syllabi >
CSC121SylS2023 >
CSC121S2023Lab05 > CSC121S2023Lab5H4
Topic revision: r1 - 2023-01-31 - cathybareiss