Scala
Scala is a Java relative that has removed some of the aspects of Java that the designers thought were no good, and added new features, notably functional programming. It was originally created in 2003 by Martin Odersky and relies on the Java Virtual Machine in order to work. Its features are somewhat similar to Clojure, but the syntax (way the language looks) is more like Java than like Scheme.
Useful Links
- The Homepage of Scala has numerous helpful tutorials, guides, and references in its Documentation section.
- Wikipedia page
- 99 bottles of beer program
Note: change the traitApplication
toApp
to get this to work on recent versions of the Scala compiler.
Tools
We will use the Scala compiler version 2.11.
Everything you need is already installed on CS department lab machines.
To install on your virtual machine, follow these steps:
-
Run
sudo apt install -y scala scala-doc
- That's it!
How I will run your code
The programs you submit should be in a single file
called proj.scala
, for either part of the project.
I will test your code by running the following commands
using the software available in the lab environment or using the instructions
above:
scalac proj.scala scala Proj
Phase 1 Requirements
For this language, you need to implement modifications A, B, C, D, F, G, and H. See the Phase 1 page for details on what this means.
Phase 2
See the Phase 2 Page for the list of suggested
problems. Of the ones listed, I recommend the following as being most
well-suited for Scala:
- Matrix Calculator
- Image Creator
- Game Scheduler
- TODO list
- Game with hidden agenda
- Guess the language
- Find the missing digits
- Sports Ticker
- Rock, Paper, Scissors
- ??? (you choose!)