Scala Labs

Labs

·       Basics

·       Recursion

·       Combinators

·       Collections

·       Object-Oriented Programming

Instructions

·       You should use the latest version of the Scala compiler.

·       Create a Scala project called CS152Labs.

·       Add the packages lab1, lab2, lab3, etc. to your Scala source folder.

·       These packages will contain .scala files containing your code (declarations of functions, classes, etc.)

·       These packages may also contain sub-packages as needed, but this should be minimized as it makes grading more difficult.

·       Each problem solution should have an app or main that tests the code. Sometimes these will be provided. For example, in Scala 2 this might look like an App declaration:

object Test extends App {
  // test code for this lab
}

/*
Test code output:
   ...
*/

            In Scala 3 this might be a global function with a main tag:

@main test() = // test code for this lab

/*
Test code output:
   ...
*/

·       When you have completed an assignment, zip your lab's source code and upload it to Canvas. Do not include binaries. (Simply drag the lab source folder from IntelliJ onto your desktop and zip it together.)

·       Grading rubrics usually award points for performance (did it run?) and design (were the design requirements met?)