Skip to content

justinayson14/immutable-list

Repository files navigation

Immutable List in Java

Comp 333 - Concepts of Programming Languages - Lab 1
Class-based Inheritance and Virtual Dispatch

Description

By the time you have completed this work, you should be able to:

  • Use class-based inhertance to implement different behaviours for the same method
  • Implement an immutable list
  • Use recursion to implement basic list operations

Quick Start

For Mac/Linux:

  1. Compile with:
    javac -cp .:hamcrest-2.2.jar:junit-4.13.jar -Xlint:all ImmutableList.java Cons.java Nil.java ImmutableListTest.java
  2. Run with
    java -cp .:hamcrest-2.2.jar:junit-4.13.jar org.junit.runner.JUnitCore ImmutableListTest

For Windows Powershell:

  1. Compile with:
    javac -cp '.;hamcrest-2.2.jar;junit-4.13.jar' -Xlint:all ImmutableList.java Cons.java Nil.java ImmutableListTest.java

  2. Run with:
    java -cp '.;hamcrest-2.2.jar;junit-4.13.jar' org.junit.runner.JUnitCore ImmutableListTest

About

Comp 333 - Concpts Prog Lang - Lab1

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages