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 (

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


Step by Step Solution

3.41 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Declarations num rent num SMALLHIGH 900 num SMALLMED 500 num SMALLLOW 200 num MEDIUMHIGH 1600 num ME... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Logic & Design Questions!