This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar | |
import scala.io._ | |
import scala.collection.mutable.HashMap | |
abstract case class OrderLine(name: String, _price:Int, weight: Int){ | |
var ammount = 1 | |
def ++ { | |
ammount += 1 | |
} | |
def price = _price |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.io.*; | |
public class Fagtest { | |
String fagkode; | |
int uketimer; | |
int aarstimer; | |
String eksamensform; | |
String faglaerer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Fagtest { | |
String fagkode; | |
int uketimer; | |
int aarstimer; | |
String eksamensform; | |
String faglaerer; | |
String elever[]; | |
public static void main (String [] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Person { | |
def apply(firstName: String, lastName: String, age:int): Person = new Person(firstName, lastName, age) | |
def apply(name: String, age:int): Person = { | |
val parts = name.split(" ").toList | |
new Person(parts(0), parts.tail.mkString(" "), age) | |
} | |
} | |
class Person(var firstName: String, var lastName: String, var age: int) { | |
NewerOlder