/Session_41_Assignment_1

Basics of Scala Programming

Primary LanguageHTML

Session_41_Assignment_1

Task 1

  • Install Oracle Virtual Box
  • Import Spark VM in Oracle Virtual Box

Task 2

Given a list of strings - List[String] (“alpha”, “gamma”, “omega”, “zeta”, “beta”)

  • find count of all strings with length 4
  • convert the list of string to a list of integers, where each string is mapped to its corresponding length
  • find count of all strings which contain alphabet ‘m’
  • find the count of all strings which start with the alphabet ‘a’

Task 3

  • Create a Scala Application (GCD.scala) to calculate the GCD of two numbers
  • Compile scala application using command "scalac GCD.scala"
  • Execute scala application and pass the runtime arguments using command "scala GCD.scala 10 25"