/* +---------------+ | rs | +---------------+ | String name | | int length | | int startTime | | int stopTime | | IAds ad | +---------------+ */ // To describe a radio show class rs { String name; int length; int startTime; int stopTime; IAds ad; rs(String name, int length, int startTime, int stopTime, IAds ad) { this.name = name; this.length = length; this.startTime = startTime; this.stopTime = stopTime; this.ad = ad; } } // To describe an IAd interface IAds { } // to decribe an ad class Ad implements IAds { String name; int length; int profit; Ad(String name, int length, int profit) { this.name = name; this.length = length; this.profit = profit; } } // to describe a public service announcement class PSA implements IAds { String code; int length; PSA(String code, int length) { this.code = code; this.length = length; } }