As part of this session, we will be talking about
import scala.io.Source object GetRevenueForEachOrder { def main(args: Array[String]): unit = { val inputpath = args(0) val orderId = arg(1).toInt val orderItems: Seq[String] = Source. fromFile(inputPath). getLines. toList val RevenueForEachOrderId = orderItems. filter(oi => oi.split(",")(1).toInt == orderId). map(oi => oi.split(",")(4).toFloat). reduce(_ + _) println(orderRevenue) } }