今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: Iterating collections
(upbeat music) - [Instructor] Now that we've explored a few ways to iterate collections, let's try a programming challenge. In this challenge, the Landon Hotel has asked you to implement three new methods on the RoomService class. The first method applies a discount to the rate of each room. The rate is provided in decimal form as a double argument to the method. You'll need to use this double to reduce the rate assigned to each room. The next method requires you to return a new collection of rooms that contain rooms from the inventory, which have the same or a higher capacity than the argument provided to the method. The final method is similar. It asks you to return a new collection of rooms that match a particular type and are below a provided rate based on the supplied arguments. This challenge uses the same format as the others. There's a comment in each method describing what needs to be achieved, and…
内容
-
-
-
-
-
(已锁定)
Iterating collection elements2 分钟 55 秒
-
(已锁定)
Accessing collection elements with iterators6 分钟 4 秒
-
(已锁定)
Modifying collections while iterating4 分钟 39 秒
-
(已锁定)
Accessing collection elements with streams5 分钟 38 秒
-
Lambda expressions2 分钟 56 秒
-
(已锁定)
Stream operations4 分钟 17 秒
-
(已锁定)
Challenge: Iterating collections5 分钟 23 秒
-
(已锁定)
-
-
-
-
-
-