Workbook 2.6
Task 1
Inside the handler method, add two model attributes:
model.addAttribute("budget", 4000); model.addAttribute("make", "Toyota");
Task 2
-
If the entered
budget
is greater than or equal to $5000, compare the enteredmake
against 5 cases:- Toyota: display
Toyota Corolla: $5,000
- Volkswagen: display
Volkswagen Jetta: $6,000
- Ford: display
Ford Escape: $7,000
- Honda: display
Honda Civic: $8,000
- default: display:
No cars match your query.
- Toyota: display
-
Otherwise, display:
Sorry, we don't have any cars below $5,000
.
Test Case: budget
: 4000
| make
: Toyota
Test Case: budget
: 10000
| make
: Toyota
Test Case: budget
: 10000
| make
: Subaru
Good Luck!
Feedback Summary
5.0
4 students
5
100%
4
0%
3
0%
2
0%
1
0%
Written Reviews
There are no written reviews yet.