Part 1
From the Java Bootcamp Resources
, launch Part 1
.
Task 1
Validate the name that gets passed into setName
.
public void setName(String name) {
// TODO
}
Throw an IllegalArgumentException
if the name is null
or blank
.
Task 2
Validate the format that gets passed into setFormat
.
public void setFormat(String format) {
// TODO
}
Throw an IllegalArgumentException
if the format is null
or blank
.
Task 3
Validate the rating that gets passed into setRating
.
public void setRating(double rating) {
// TODO
}
Throw an IllegalArgumentException
if the rating is less than 0 or greater than 10.
Associated Course: The Complete Java Development Bootcamp
Related Course: The Complete Spring Boot Development Bootcamp – Become a Java Web Developer
Feedback Summary
4.7
43 students
5
91%
4
2%
3
0%
2
0%
1
7%
Written Reviews
There are no written reviews yet.