Spring Boot Bootcamp – Workbooks and Challenges
)}

Workbook 2.6

Screen Shot 2022-08-15 at 11.17.47 PM.png

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 entered make 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.
  • Otherwise, display: Sorry, we don't have any cars below $5,000.

Test Case: budget: 4000 | make: Toyota


Screen Shot 2022-05-22 at 2.16.05 AM.png

Test Case: budget: 10000 | make: Toyota


Screen Shot 2022-05-22 at 2.17.20 AM.png

Test Case: budget: 10000 | make: Subaru


Screen Shot 2022-05-22 at 2.18.14 AM.png

Good Luck!

Feedback Summary
5.0
3 students
5

100%
4

0%
3

0%
2

0%
1

0%
Written Reviews
There are no written reviews yet.