随笔分类 - 大三寒假spark实验
摘要:object test3 { case class student(id: String, gender: String, score: Map[String, Int]) //读取文件的方法: def inputStudentList(filename: String): List[student
阅读全文
摘要:case class Point(var x:Double,var y:Double) extends Drawable{ def shift(deltaX:Double,deltaY:Double): Unit = { x+=deltaX; y+=deltaY } } trait Drawable
阅读全文
摘要:import scala.io.StdIn.readLine object test1 { def main(args: Array[String]): Unit = { val q = readLine("请输入一个大于0的数:").toDouble val result = calculateS
阅读全文