Complete the following tasks: Design a method that calculates the monthly cost to rent a roadside billboard.
Question:
Complete the following tasks:
Design a method that calculates the monthly cost to rent a roadside billboard. Variables include the size of the billboard (S, M, or L, for small, medium, or large) and its location (H, M, or L for high-, medium-, or low-traffic areas). The method should throw an exception if the size or location code is invalid. The monthly rental cost is shown in Table 11-1.
High Traffic | Medium Traffic | Low Traffic | |
Small size | 900.00 | 500.00 | 200.00 |
Medium size | 1600.00 | 1200.00 | 600.00 |
Large size | 2000.00 | 1500.00 | 800.00 |
Table 11-1 Monthly billboard rental rates
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: