diff --git a/README.md b/README.md
index abb7ac8bec2cb4bd72d953f1afefae86a96d00f3..a995ac999f6233a44888a99b2064c3bdc6047a17 100644
--- a/README.md
+++ b/README.md
@@ -1,93 +1,47 @@
-# ooj2024autumn.exercise2
+# DTEK0066 exercise 2 template
 
+## Tehtävänanto
 
+Tehtävänanto löytyy Villestä. Osa tehtävistä tehdään Villessa ja osa palautetaan Gitlabin kautta. Linkki omaan repositorioon ilmoitetaan Villessä. 
 
-## Getting started
+Forkkaa itsellesi tämä projekti pohjaksi. Huomaa, että kaikki harjoituskerran 2 tehtävät tehdään samaan projektiin eli pohja forkataan vain kerran.
 
-To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+Main.java luokka sisältää ohjelman käynnistävän main-rutiinin. Muihin luokkiin ei tule main-rutiinia lisätä. Harjoitustyöpohja on rakennettu niin, 
+että Main-luokan ajamalla kaikki harjoitustehtävät suoritetaan. 
 
-Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+Huomaa, että testit täytyy kuitenkin ajaa erikseen (tehtävät 7 ja 8). 
 
-## Add your files
+## Tehtäviin vastaaminen
 
-- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
-- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+- Tehtävät 1 ja 2 tehdään kokonaan Villessä.
+- Tehtävä 3 Kirjoita luokkiin VuosiKurssi ja Opiskelija julkiset luokkainvariantit 
+- Tehtävä 4 Määrittele alku- ja loppuehdot tehtävänannossa (Ville) pyydetyille rutiineille. Kirjoita vastauksesi luokkien tiedostoihin niille varatuille paikoille.
+- Tehtävä 5 Toteuta VuosiKurssi-luokan rutiini lisääOpiskelijaTurvallisesti. Huomaa, että rutiinin signatuuria tai alku- ja loppuehtoja ei saa muuttaa.
+- Tehtävä 6 Lisää lisääOpiskelijaTurvallisesti rutiiniin poikkeuskäsittelyn Villessä kuvatulla tavalla.
+- Tehtävä 7 Suunnittele ja toteuta Sorter-luokan triangleSort rutiinin testit.
+- Tehtävä 8 Suunnittele ja toteuta StringMagic-luokan rutiinien testit.
 
-```
-cd existing_repo
-git remote add origin https://gitlab.utu.fi/jumalah/ooj2024autumn.exercise2.git
-git branch -M main
-git push -uf origin main
-```
-
-## Integrate with your tools
-
-- [ ] [Set up project integrations](https://gitlab.utu.fi/jumalah/ooj2024autumn.exercise2/-/settings/integrations)
-
-## Collaborate with your team
-
-- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
-- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
-- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
-- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
-
-## Test and Deploy
-
-Use the built-in continuous integration in GitLab.
-
-- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
-- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
-- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
-- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
-- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
-
-***
-
-# Editing this README
+Maven-projektissa testit sijoitetaan test-hakemiston alle. 
 
-When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
+## Työnkulku
 
-## Suggestions for a good README
+1. [Forkkaa tämä projekti](https://tech.utugit.fi/soft/tools/lectures/dtek2074/2023-fi/git/gitlab/#gitlab-projektin-forkkaus)
+2. [Kloonaa oma kopiosi projektista](https://tech.utugit.fi/soft/tools/lectures/dtek2074/2023-fi/git/gitlab/#gitlab-projektin-haku-paikalliseksi)
+3. Tee tehtäviä
+4. [Tallenna muutokset gitiin](https://tech.utugit.fi/soft/tools/lectures/dtek2074/2023-fi/git/usage/#ty%C3%B6kopion-ja-indeksin-k%C3%A4sittely)
+5. [Lähetä muutokset takaisin GitLabiin](https://tech.utugit.fi/soft/tools/lectures/dtek2074/2023-fi/git/gitlab/#paikallisen-muutoksen-l%C3%A4hett%C3%A4minen-gitlabiin)
 
-Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
+Tarvittaessa toista vaiheet 3 -- 5.
 
-## Name
-Choose a self-explaining name for your project.
+## Mavenin käskyjä
 
-## Description
-Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
+Jos käytät jotain integroitua kehitysympäristöä (IntelliJ Idea, Eclipse, VS Code), et todennäköisesti tarvitse alla olevia komentoja. 
 
-## Badges
-On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
+[Lue tarvittaessa ohjeet](https://tech.utugit.fi/soft/tools/lectures/dtek2074/2023-fi/build/basic/).
 
-## Visuals
-Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
-
-## Installation
-Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
-
-## Usage
-Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
-
-## Support
-Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
-
-## Roadmap
-If you have ideas for releases in the future, it is a good idea to list them in the README.
-
-## Contributing
-State if you are open to contributions and what your requirements are for accepting them.
-
-For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
-
-You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
-
-## Authors and acknowledgment
-Show your appreciation to those who have contributed to the project.
-
-## License
-For open source projects, say how it is licensed.
-
-## Project status
-If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
+```bash
+$ mvn clean
+$ mvn compile
+$ mvn test
+$ mvn exec:java
+```
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1c0a0da1c977d0ceb589d085f0d78116e54e005c
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,319 @@
+<project>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>fi.utu.tech</groupId>
+    <artifactId>ooj-exercise2</artifactId>
+    <version>1.0.0</version>
+
+    <packaging>jar</packaging>
+
+    <properties>
+        <!-- Configures the main class for this project (i.e. what to launch) -->
+        <project.mainclass>fi.utu.tech.ooj.exercise2.Main</project.mainclass>
+        <project.mainmodule>fi.utu.tech.ooj.exercise2</project.mainmodule>
+        <project.launcher>myapp</project.launcher>
+
+        <!-- The source encoding should always be utf-8. Don't change. -->
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <!-- Version numbers for various modules -->
+        <jdk.version>17</jdk.version>
+        <jqwik.version>1.8.4</jqwik.version>
+        <junit.version>5.10.2</junit.version>
+        <junitplatform.version>1.10.2</junitplatform.version>
+    </properties>
+
+    <repositories>
+        <repository>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+            <id>central</id>
+            <name>Central Repository</name>
+            <url>https://repo.maven.apache.org/maven2</url>
+        </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-params</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.platform</groupId>
+            <artifactId>junit-platform-commons</artifactId>
+            <version>${junitplatform.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.jqwik</groupId>
+            <artifactId>jqwik</artifactId>
+            <version>${jqwik.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>com.diffplug.spotless</groupId>
+              <artifactId>spotless-maven-plugin</artifactId>
+              <version>2.43.0</version>
+              <configuration>
+                <formats>
+                    <format>
+                        <includes>src/**/*.java</includes>
+                        <prettier>
+                            <devDependencies>
+                                <prettier>2.8.1</prettier>
+                                <prettier-plugin-java>2.0.0</prettier-plugin-java>
+                            </devDependencies>
+                            <config>
+                                <tabWidth>4</tabWidth>
+                                <parser>java</parser>
+                            </config>
+                        </prettier>
+                    </format>
+                    <format>
+                        <includes>
+                            <include>pom.xml</include>
+                        </includes>
+                        <prettier>
+                            <devDependencyProperties>
+                                <property>
+                                    <name>prettier</name>
+                                    <value>2.8.1</value>
+                                </property>
+                                <property>
+                                    <name>@prettier/plugin-xml</name>
+                                    <value>2.2.0</value>
+                                </property>
+                            </devDependencyProperties>
+                            <config>
+                                <tabWidth>4</tabWidth>
+                                <printWidth>100</printWidth>
+                                <parser>xml</parser>
+                            </config>
+                        </prettier>
+                    </format>
+                  <format>
+                    <includes>
+                      <include>*.md</include>
+                      <include>.gitignore</include>
+                    </includes>
+                    <trimTrailingWhitespace />
+                    <endWithNewline />
+                    <indent>
+                      <spaces>true</spaces>
+                      <spacesPerTab>4</spacesPerTab>
+                    </indent>
+                  </format>
+                </formats>
+                <java>
+                    <includes>
+                      <include>src/**/*.java</include>
+                    </includes>
+                    <trimTrailingWhitespace />
+                    <endWithNewline />
+                    <indent>
+                        <spaces>true</spaces>
+                        <spacesPerTab>4</spacesPerTab>
+                    </indent>
+                  <importOrder />
+                  <removeUnusedImports />
+                  <googleJavaFormat>
+                    <version>1.15.0</version>
+                    <style>AOSP</style>
+                  </googleJavaFormat>
+                </java>
+              </configuration>
+            </plugin>
+
+            <!-- Run this app with exec:java -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <version>3.2.0</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <mainClass>${project.mainclass}</mainClass>
+                </configuration>
+            </plugin>
+
+            <!-- Make the packaged jar executable -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>3.3.0</version>
+                <configuration>
+                  <!-- DO NOT include log4j.properties file in your Jar -->
+                  <excludes>
+                    <exclude>**/log4j.properties</exclude>
+                  </excludes>
+                  <archive>
+                    <manifest>
+                        <!-- Jar file entry point -->
+                        <mainClass>${project.mainclass}</mainClass>
+                    </manifest>
+                  </archive>
+                </configuration>
+            </plugin>
+
+
+            <!-- JDK source/target versions -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.13.0</version>
+
+                <configuration>
+                    <compilerArgument>-Xlint:unchecked</compilerArgument>
+                    <source>${jdk.version}</source>
+                    <target>${jdk.version}</target>
+                </configuration>
+            </plugin>
+
+            <!-- Also create a jar of the sources -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>3.3.0</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- JShell (jshell:run) -->
+            <plugin>
+                <groupId>com.github.johnpoth</groupId>
+                <artifactId>jshell-maven-plugin</artifactId>
+                <version>1.4</version>
+            </plugin>
+
+            <!-- UTU DbC Javadoc annotations -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>3.4.1</version>
+                <executions>
+                    <execution>
+                    <id>attach-javadocs</id>
+                    <goals>
+                        <goal>jar</goal>
+                    </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <tags>
+                        <tag>
+                            <name>toDo</name>
+                            <placement>a</placement>
+                            <head>To do:</head>
+                        </tag>
+                        <tag>
+                            <name>classInvariant</name>
+                            <placement>t</placement>
+                            <head>Class invariant:</head>
+                        </tag>
+                        <tag>
+                            <name>classInvariantProtected</name>
+                            <placement>t</placement>
+                            <head>Protected class invariant:</head>
+                        </tag>
+                        <tag>
+                            <name>classInvariantPrivate</name>
+                            <placement>t</placement>
+                            <head>Private class invariant:</head>
+                        </tag>
+                        <tag>
+                            <name>abstractionFunction</name>
+                            <placement>t</placement>
+                            <head>Abstraction function:</head>
+                        </tag>
+                        <tag>
+                            <name>pre</name>
+                            <placement>cm</placement>
+                            <head>Precondition:</head>
+                        </tag>
+                        <tag>
+                            <name>post</name>
+                            <placement>cm</placement>
+                            <head>Postcondition:</head>
+                        </tag>
+                        <tag>
+                            <name>postProtected</name>
+                            <placement>cm</placement>
+                            <head>Protected postcondition:</head>
+                        </tag>
+                        <tag>
+                            <name>postPrivate</name>
+                            <placement>cm</placement>
+                            <head>Private postcondition:</head>
+                        </tag>
+                        <tag>
+                            <name>time</name>
+                            <placement>cmf</placement>
+                            <head>Time complexity:</head>
+                        </tag>
+                        <tag>
+                            <name>space</name>
+                            <placement>cmf</placement>
+                            <head>Space complexity:</head>
+                        </tag>
+                        <tag>
+                            <name>correspondence</name>
+                            <placement>a</placement>
+                            <head>Correspondence:</head>
+                        </tag>
+                        <tag>
+                            <name>download</name>
+                            <placement>a</placement>
+                            <head>Download:</head>
+                        </tag>
+                    </tags>
+                    <show>protected</show>
+                    <failOnError>false</failOnError>
+                    <sourceFileExcludes>
+                        <sourceFileExclude>**/module-info.java</sourceFileExclude>
+                    </sourceFileExcludes>
+                </configuration>
+            </plugin>
+
+            <!-- JUnit & JQwik test integration -->
+
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>3.2.5</version>
+            </plugin>
+            <plugin>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <version>3.2.5</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png
new file mode 100644
index 0000000000000000000000000000000000000000..21764803741ed6b43008ed7494d0049764e8f42a
Binary files /dev/null and b/public/favicon-32x32.png differ
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..b998eb03fd45085ea30d07ae194b252530bb8d1c
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charSet="utf-8"/>
+<link rel="icon" href="favicon-32x32.png" type="image/png"/>
+<link rel="stylesheet" href="style.css">
+<title>UTU / OOJ project report</title>
+</head>
+<body>
+  <div class="layout">
+    <div class="layout-container">
+        <header>
+            <div class="header">
+                <div class="header-content">
+                    <a href="https://www.utu.fi">
+                      <img class="sitebranding" alt="University of Turku" src="utulogo.png" />
+                    </a>
+                    <nav>
+                        <ul>
+                        <li class="active"><a href="/">Report</a></li>
+                        </ul>
+                    </nav>
+                </div>
+            </div>
+        </header>
+      <div class="main-content">
+        <h2>Project report</h2>
+      </div>
+      <div class="main-content">
+        <iframe src="report.txt" title="Build"></iframe> 
+      </div>
+      <div class="main-content">
+        <iframe src="surefire-report.html" title="Surefire report"></iframe> 
+      </div>
+      <footer>
+        <div class="footer">
+            <div class="footer-content">
+                <a href="https://www.utu.fi">
+                  <img class="sitebranding" alt="University of Turku" src="utulogow.png"/>
+                </a>
+                <nav>
+                    <ul>
+                    <li>© 2019 <a href="https://soft.utu.fi/">Software engineering</a></li>
+                    </ul>
+                </nav>
+            </div>
+        </div>
+      </footer>
+    </div>
+  </div>
+</body>
+</html>
diff --git a/public/style.css b/public/style.css
new file mode 100644
index 0000000000000000000000000000000000000000..7c9950b2e790b5966266508d7e888adb7dfa189c
--- /dev/null
+++ b/public/style.css
@@ -0,0 +1,954 @@
+@font-face {
+  font-family: "brother-1816";
+  src: url("https://use.typekit.net/af/e4f93d/00000000000000003b9b03cb/27/l?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=i3&v=3") format("woff2"), url("https://use.typekit.net/af/e4f93d/00000000000000003b9b03cb/27/d?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=i3&v=3") format("woff"), url("https://use.typekit.net/af/e4f93d/00000000000000003b9b03cb/27/a?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=i3&v=3") format("opentype");
+  font-style: italic;
+  font-weight: 300;
+  font-display: auto;
+}
+
+@font-face {
+  font-family: "brother-1816";
+  src: url("https://use.typekit.net/af/deeb73/00000000000000003b9b03d0/27/l?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=n5&v=3") format("woff2"), url("https://use.typekit.net/af/deeb73/00000000000000003b9b03d0/27/d?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=n5&v=3") format("woff"), url("https://use.typekit.net/af/deeb73/00000000000000003b9b03d0/27/a?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=n5&v=3") format("opentype");
+  font-style: normal;
+  font-weight: 500;
+  font-display: auto;
+}
+
+@font-face {
+  font-family: "brother-1816";
+  src: url("https://use.typekit.net/af/f5cf85/00000000000000003b9b03d2/27/l?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/f5cf85/00000000000000003b9b03d2/27/d?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/f5cf85/00000000000000003b9b03d2/27/a?primer=8c6cdece1802ac03951c30593622b1b6185a07621a4f8858e37fe29080c384e2&fvd=n7&v=3") format("opentype");
+  font-style: normal;
+  font-weight: 700;
+  font-display: auto;
+}
+
+:root {
+  --pageWidth: 894px;
+  --backgroundColor: #fff;
+  --colorUtu1: #8b5dcb;
+  --colorUtu2: #78c8d2;
+  --colorUtu3: #f8485e;
+  --colorUtu4: #adcb00;
+  --colorUtu5: #000;
+  --colorUtu6: #868686;
+  --colorUtu7: #b1b1b0;
+  --colorUtu8: #d9d9d9;
+  --colorUtu9: #ffffff;
+}
+
+html {
+    font: 120% brother-1816, sans-serif;
+    box-sizing: border-box;
+    overflow-y: scroll;
+    -ms-text-size-adjust: 100%;
+    -webkit-text-size-adjust: 100%;
+    margin: 0;
+    padding: 0;
+}
+
+.layout {
+    background-color: var(--colorUtu8);
+    padding-right:0;
+    padding-left:0;
+}
+
+.layout-container {
+    background-color: var(--colorUtu9);
+    margin: 0 auto;
+    max-width:100rem;
+}
+
+.main-content {
+    display: flex;
+    align-items: flex-start;
+    align-content: space-between;
+    flex-wrap: wrap;
+}
+
+.toc-container {
+    margin-left: -5em;
+    margin-right: 1em;
+    width: 20%;
+    flex-grow: 1;
+    position: sticky;
+    display: block;
+    border-radius: 15px;
+    padding: 0.5em;
+    padding-top: 2em;
+    padding-bottom: 2em;
+    background: var(--colorUtu8);
+    border: 2px solid var(--colorUtu5);
+}
+
+.toc-container a {
+    color: var(--colorUtu5);
+    text-decoration: none;
+}
+
+.toc-container a:hover {
+    color: var(--colorUtu5);
+    text-decoration: underline solid var(--colorUtu5);
+}
+
+.header a:hover {
+    color: var(--colorUtu5);
+    text-decoration: underline solid var(--colorUtu5);
+}
+
+.main-header {
+}
+
+.main-lecture {
+    max-width: 80%;
+}
+
+.main-content  {
+    flex-grow: 1;
+}
+
+@media (max-width:60em) {
+    .main-content {
+        display: block;
+    }
+    .main-lecture {
+        max-width: 100%;
+    }
+    .toc-container {
+        margin: 1em auto 1em auto;
+        padding: 0.5em;
+        width: 90%;
+    }
+}
+
+.lecture-grid-container {
+    display: grid;
+    grid-template-columns: auto auto;
+    border-top: 1px solid var(--colorUtu5);
+    border-bottom: 1px solid var(--colorUtu5);
+    padding: 2px;
+    align-items: center;
+    width: 100%;
+}
+
+.lecture-grid-container2 {
+    display: grid;
+    grid-template-columns: auto;
+    border-top: 1px solid var(--colorUtu5);
+    border-bottom: 1px solid var(--colorUtu5);
+    padding: 2px;
+    align-items: center;
+    width: 100%;
+}
+
+.lecture-grid-item {
+    border: 0;
+    padding: 10px;
+    font-size: 16px;
+    text-align: center;
+    max-width: 100%;
+    margin: 0 auto;
+}
+
+.controls-right button {
+  margin-left: 0.5em;
+}
+
+.controls-left button {
+  margin-right: 0.5em;
+}
+
+
+.lecture-grid-item2:first-child {
+    border-right: 2px solid var(--colorUtu8);
+}
+
+@media (min-width:50em) {
+    .layout {
+        padding-right: 2em;
+        padding-left: 2em;
+    }
+    .main-content {
+        padding-right: 2.5em;
+        padding-left: 2.5em;
+        padding-bottom: 2.5em;
+    }
+}
+
+@media (min-width:60em) {
+    .layout {
+        padding-right: 3em;
+        padding-left: 3em;
+    }
+    .main-content {
+        padding-right: 3.25em;
+        padding-left: 3.25em;
+        padding-bottom: 3.25em;
+    }
+}
+
+@media (min-width:80em) {
+    .layout {
+        padding-right: 4em;
+        padding-left: 4em;
+    }
+    .main-content {
+        padding-right: 4em;
+        padding-left: 4em;
+        padding-bottom: 4em;
+    }
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+main,
+menu,
+nav,
+section,
+summary {
+  display: block;
+}
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+}
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+progress {
+  vertical-align: baseline;
+}
+[hidden],
+template {
+  display: none;
+}
+a {
+  background-color: transparent;
+  -webkit-text-decoration-skip: objects;
+}
+a:active,
+a:hover {
+  outline-width: 0;
+}
+abbr[title] {
+  border-bottom: none;
+  text-decoration: underline;
+  text-decoration: underline dotted;
+}
+b,
+strong {
+  font-weight: inherit;
+  font-weight: bolder;
+}
+dfn {
+  font-style: italic;
+}
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+mark {
+  background-color: #ff0;
+  color: #000;
+}
+small {
+  font-size: 80%;
+}
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+sub {
+  bottom: -0.25em;
+}
+sup {
+  top: -0.5em;
+}
+img {
+  border-style: none;
+}
+svg:not(:root) {
+  overflow: hidden;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
+}
+figure {
+  margin: 1em 40px;
+}
+hr {
+  box-sizing: content-box;
+  height: 0;
+  overflow: visible;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+  font: inherit;
+  margin: 0;
+}
+optgroup {
+  font-weight: 700;
+}
+button,
+input {
+  overflow: visible;
+}
+button,
+select {
+  text-transform: none;
+}
+[type="reset"],
+[type="submit"],
+button,
+html [type="button"] {
+  -webkit-appearance: button;
+}
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner,
+button::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring,
+button:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+fieldset {
+  border: 1px solid silver;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+legend {
+  box-sizing: border-box;
+  color: inherit;
+  display: table;
+  max-width: 100%;
+  padding: 0;
+  white-space: normal;
+}
+textarea {
+  overflow: auto;
+}
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box;
+  padding: 0;
+}
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+[type="search"] {
+  -webkit-appearance: textfield;
+  outline-offset: -2px;
+}
+[type="search"]::-webkit-search-cancel-button,
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+::-webkit-input-placeholder {
+  color: inherit;
+  opacity: 0.54;
+}
+::-webkit-file-upload-button {
+  -webkit-appearance: button;
+  font: inherit;
+}
+* {
+  box-sizing: inherit;
+}
+*:before {
+  box-sizing: inherit;
+}
+*:after {
+  box-sizing: inherit;
+}
+body {
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    margin: 0;
+    padding: 0;
+    color: hsla(0, 0%, 0%, 0.8);
+    font-weight: normal;
+    word-wrap: break-word;
+    font-kerning: normal;
+    -moz-font-feature-settings: "kern", "liga", "clig", "calt";
+    -ms-font-feature-settings: "kern", "liga", "clig", "calt";
+    -webkit-font-feature-settings: "kern", "liga", "clig", "calt";
+    font-feature-settings: "kern", "liga", "clig", "calt";
+}
+img {
+  max-width: 100%;
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+h1 {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  color: inherit;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+  font-weight: bold;
+  text-rendering: optimizeLegibility;
+  font-size: 2.25rem;
+  line-height: 1.1;
+}
+h2 {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  color: inherit;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+  font-weight: bold;
+  text-rendering: optimizeLegibility;
+  font-size: 1.62671rem;
+  line-height: 1.1;
+}
+h3 {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  color: inherit;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+  font-weight: bold;
+  text-rendering: optimizeLegibility;
+  font-size: 1.38316rem;
+  line-height: 1.1;
+}
+h4 {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  color: inherit;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+  font-weight: bold;
+  text-rendering: optimizeLegibility;
+  font-size: 1rem;
+  line-height: 1.1;
+}
+h5 {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  color: inherit;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+  font-weight: bold;
+  text-rendering: optimizeLegibility;
+  font-size: 0.85028rem;
+  line-height: 1.1;
+}
+h6 {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  color: inherit;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+  font-weight: bold;
+  text-rendering: optimizeLegibility;
+  font-size: 0.78405rem;
+  line-height: 1.1;
+}
+hgroup {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+ul {
+  margin-left: 1.45rem;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  list-style-position: outside;
+  list-style-image: none;
+}
+ol {
+  margin-left: 1.45rem;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  list-style-position: outside;
+  list-style-image: none;
+}
+dl {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+dd {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+p {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+figure {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+pre {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  margin-bottom: 1.45rem;
+  font-size: 0.85rem;
+  line-height: 1.42;
+  background: hsla(0, 0%, 0%, 0.04);
+  border-radius: 3px;
+  overflow: auto;
+  word-wrap: normal;
+  padding: 1.45rem;
+}
+table {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  font-size: 1rem;
+  line-height: 1.45rem;
+  border-collapse: collapse;
+  width: 100%;
+}
+fieldset {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+blockquote {
+  margin-left: 1.45rem;
+  margin-right: 1.45rem;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+form {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+noscript {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+iframe {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+  width: 100%;
+  min-height: 90vh;
+}
+hr {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: calc(1.45rem - 1px);
+  background: hsla(0, 0%, 0%, 0.2);
+  border: none;
+  height: 1px;
+}
+address {
+  margin-left: 0;
+  margin-right: 0;
+  margin-top: 0;
+  padding-bottom: 0;
+  padding-left: 0;
+  padding-right: 0;
+  padding-top: 0;
+  margin-bottom: 1.45rem;
+}
+b {
+  font-weight: bold;
+}
+strong {
+  font-weight: bold;
+}
+dt {
+  font-weight: bold;
+}
+th {
+  font-weight: bold;
+}
+li {
+  margin-bottom: calc(1.45rem / 2);
+}
+ol li {
+  padding-left: 0;
+}
+ul li {
+  padding-left: 0;
+}
+li > ol {
+  margin-left: 1.45rem;
+  margin-bottom: calc(1.45rem / 2);
+  margin-top: calc(1.45rem / 2);
+}
+li > ul {
+  margin-left: 1.45rem;
+  margin-bottom: calc(1.45rem / 2);
+  margin-top: calc(1.45rem / 2);
+}
+blockquote *:last-child {
+  margin-bottom: 0;
+}
+li *:last-child {
+  margin-bottom: 0;
+}
+p *:last-child {
+  margin-bottom: 0;
+}
+li > p {
+  margin-bottom: calc(1.45rem / 2);
+}
+code {
+  font-size: 0.85rem;
+  line-height: 1.45rem;
+}
+kbd {
+  font-size: 0.85rem;
+  line-height: 1.45rem;
+}
+samp {
+  font-size: 0.85rem;
+  line-height: 1.45rem;
+}
+abbr {
+  border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
+  cursor: help;
+}
+acronym {
+  border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
+  cursor: help;
+}
+abbr[title] {
+  border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
+  cursor: help;
+  text-decoration: none;
+}
+thead {
+  text-align: left;
+}
+td,
+th {
+  text-align: left;
+  border-bottom: 1px solid hsla(0, 0%, 0%, 0.12);
+  font-feature-settings: "tnum";
+  -moz-font-feature-settings: "tnum";
+  -ms-font-feature-settings: "tnum";
+  -webkit-font-feature-settings: "tnum";
+  padding-left: 0.96667rem;
+  padding-right: 0.96667rem;
+  padding-top: 0.725rem;
+  padding-bottom: calc(0.725rem - 1px);
+}
+th:first-child,
+td:first-child {
+  padding-left: 0;
+}
+th:last-child,
+td:last-child {
+  padding-right: 0;
+}
+tt,
+code {
+  background-color: hsla(0, 0%, 0%, 0.04);
+  border-radius: 3px;
+  font-family: "SFMono-Regular", Consolas, "Roboto Mono", "Droid Sans Mono",
+    "Liberation Mono", Menlo, Courier, monospace;
+  padding: 0;
+  padding-top: 0.2em;
+  padding-bottom: 0.2em;
+}
+pre code {
+  background: none;
+  line-height: 1.42;
+}
+code:before,
+code:after,
+tt:before,
+tt:after {
+  letter-spacing: -0.2em;
+  content: " ";
+}
+pre code:before,
+pre code:after,
+pre tt:before,
+pre tt:after {
+  content: "";
+}
+@media only screen and (max-width: 480px) {
+  html {
+    font-size: 100%;
+  }
+}
+
+
+header, footer {
+    padding-top: 0.6rem;
+    padding-bottom: 0.6rem;
+}
+
+footer {
+    background: var(--colorUtu5);
+    color: var(--colorUtu9);
+}
+
+.header, .footer {
+    font-size: 87.4975%;
+    padding-left: 3.25rem;
+    padding-bottom: 0.875rem;
+    padding-right: 3.25rem;
+    padding-top: 0.875rem;
+}
+
+.header-content {
+    width: 100%;
+    border-bottom: 1px solid var(--colorUtu8);
+    display: flex;
+    flex-wrap: wrap;
+    align-items: flex-end;
+    justify-content: space-between;
+}
+
+.footer-content {
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: flex-start;
+    justify-content: space-between;
+}
+
+.header nav, .footer nav {
+    display: block;
+    flex: 1 0 auto;
+    padding-bottom: 0.5em;
+}
+
+.footer nav {
+    display: block;
+    flex: 1 0 auto;
+    padding-top: 0.5em;
+    padding-bottom: 0;
+}
+
+.header ul, .footer ul {
+    float: right;
+    margin: 0 -0.5em;
+    padding: 0;
+    display: flex;
+}
+
+.header li, .footer li {
+    list-style: none;
+    padding: 0;
+    margin: 0 1em;
+    text-transform: uppercase;
+    font-weight: bold;
+}
+
+.header a {
+    color: var(--colorUtu5);
+    text-decoration: none;
+}
+
+.footer a {
+    color: var(--colorUtu9);
+    text-decoration: none;
+}
+
+.header a:hover {
+    color: var(--colorUtu5);
+    text-decoration: underline solid var(--colorUtu5);
+}
+.header .active {
+    color: var(--colorUtu5);
+    text-decoration: underline solid var(--colorUtu5);
+}
+
+.footer a:hover {
+    color: var(--colorUtu9);
+    text-decoration: underline solid var(--colorUtu9);
+}
+
+.sitebranding {
+    width: 14.040rem;
+    height: 3.967rem;
+    flex: 0 0 auto;
+    flex-shrink: 0;
+    margin: 0;
+    margin-bottom: 1em;
+}
+
+@media (min-width:50em) {
+    .header, .footer {
+        font-size: 91.665%;
+        padding-left: 3.1rem;
+        padding-bottom: 0.94rem;
+        padding-right: 3.1rem;
+        padding-top: 0.94rem;
+    }
+
+    .sitebranding {
+        width: 15.100rem;
+        height: 4.267rem;
+    }
+}
+
+@media (min-width:60em) {
+    .header, .footer {
+        font-size: 87.4975%;
+        padding-left: 4rem;
+        padding-bottom: 1.1rem;
+        padding-right: 4rem;
+        padding-top: 1.1rem;
+    }
+
+    .sitebranding {
+        width: 16.400rem;
+        height: 4.634rem;
+    }
+}
+
+@media (min-width:80em) {
+    .header, .footer {
+        font-size: 83.33%;
+        padding-left: 5rem;
+        padding-bottom: 1.25rem;
+        padding-right: 5rem;
+        padding-top: 1.25rem;
+    }
+
+    .sitebranding {
+        width: 17.700rem;
+        height: 5.002rem;
+    }
+}
diff --git a/public/utulogo.png b/public/utulogo.png
new file mode 100644
index 0000000000000000000000000000000000000000..494f01eb239e7e41aed7e816ebdb377e6e4774ac
Binary files /dev/null and b/public/utulogo.png differ
diff --git a/public/utulogow.png b/public/utulogow.png
new file mode 100644
index 0000000000000000000000000000000000000000..f0af24f59fcf77e473d30a16218bde35e5d1dca7
Binary files /dev/null and b/public/utulogow.png differ
diff --git a/report.sh b/report.sh
new file mode 100644
index 0000000000000000000000000000000000000000..38d80d1aef9b992054770be0b90243771fc2350d
--- /dev/null
+++ b/report.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+find src > public/report.txt
+mvn clean test 2>&1 >> public/report.txt
+mvn surefire-report:report
+cp target/site/surefire-report.html public/
diff --git a/src/main/java/fi/utu/tech/ooj/exercise2/Main.java b/src/main/java/fi/utu/tech/ooj/exercise2/Main.java
new file mode 100644
index 0000000000000000000000000000000000000000..71ed3a84ed7c1eda1c59d49f37da8cd1a6d18ec2
--- /dev/null
+++ b/src/main/java/fi/utu/tech/ooj/exercise2/Main.java
@@ -0,0 +1,38 @@
+package fi.utu.tech.ooj.exercise2;
+
+
+import java.util.Arrays;
+
+public class Main {
+    public static void main(String[] args) {
+        System.out.println("DTEK0066 2024 syksy, Tehtäväkerta 2");
+
+        /*  Tämä main-metodi on ainoa, joka tarvitaan kaikkien tehtävien suorittamiseksi.
+            Jokaisessa tehtäviä sisältävässä pakkauksessa on Teht* luokka, josta löytyy
+            kyseiseen tehtävään kuuluvat ajot suorittava staattinen rutiini.
+            Näitä rutiineja kutsumalla suoritamme tässä kaikkien tehtävien ajot.
+         */
+
+        System.out.println("Tehtäväpohja käynnistyy");
+
+        System.out.println("--------------");
+        System.out.println("Tehtävä7 esimerkkilajittelu");
+        int[] lajittelematonTaulukko = { 4, 7, 100, 45, 38, -10, -34, 77, 2, 10, -33, 156, -234, -177, 123, 90, 9, 44, -15};
+        int alaraja = -40;
+        int keskikohta = 10;
+        int ylaraja = 100;
+        int [] lajiteltuTaulukko = Sorter.triangleSort(lajittelematonTaulukko, alaraja, keskikohta, ylaraja);
+        System.out.println("Lajittelematon taulukko");
+        System.out.println(Arrays.toString(lajittelematonTaulukko));
+        System.out.println("Lajiteltu ja rajoitettu taulukko");
+        System.out.println(Arrays.toString(lajiteltuTaulukko));
+        System.out.println("--------------");
+
+        System.out.println("Tehtävä8 merkkijonomuunnos");
+        String testiMerkkijono = "#Olipa kerran 1 merkkijono!!";
+        System.out.println("Syöte on: " + testiMerkkijono);
+        System.out.println("Piraattiversio on: " + StringMagic.piraterize(testiMerkkijono));
+        System.out.println("Tehtävien suoritus on päättynyt");
+
+    }
+}
diff --git a/src/main/java/fi/utu/tech/ooj/exercise2/Opiskelija.java b/src/main/java/fi/utu/tech/ooj/exercise2/Opiskelija.java
new file mode 100644
index 0000000000000000000000000000000000000000..48f9dc20f1f120318145ae23019139a936c3bc85
--- /dev/null
+++ b/src/main/java/fi/utu/tech/ooj/exercise2/Opiskelija.java
@@ -0,0 +1,85 @@
+package fi.utu.tech.ooj.exercise2;
+
+public class Opiskelija {
+
+    /* Tehtävä 3 Määrittele luokkainvariantti
+     *
+     * Luokkainvariantti: Etunimi on kaksi merkkiä eikä numeroita. Samoin sukunimi. Opiskelijanumero koostuu numeroista 0-9.
+     */
+    private String etunimi;
+    private String sukunimi;
+    private String opiskelijaNumero;
+    private int syntymavuosi;
+
+    /* Tehtävä 4
+     * Määrittele  alku- ja loppuehdot konstruktorille
+     */
+
+    /* Alkuehto: Syntymavuosi > 1800, opiskelijanumero koostuu luvuista
+     * 0-9
+     * Loppuehto: palauttaa opiskelija-olion
+     */
+
+    /*KONSTRUKTORI*/
+    public Opiskelija(String etunimi, String sukunimi, String opiskelijaNumero, int syntymavuosi) {
+        this.etunimi = etunimi;
+        this.sukunimi = sukunimi;
+        this.opiskelijaNumero = opiskelijaNumero;
+        this.syntymavuosi = syntymavuosi;
+    }
+
+    /*GETTERIT*/
+    public String getEtunimi() {
+        return etunimi;
+    }
+    public String getSukunimi() {
+        return sukunimi;
+    }
+    public String getOpiskelijaNumero() {
+        return opiskelijaNumero;
+    }
+    public int getSyntymavuosi() {
+        return syntymavuosi;
+    }
+
+    /*SETTERIT*/
+
+    /* Tehtävä 4
+     * Määrittele  alku- ja loppuehdot alla oleville settereille
+     */
+
+     /* Alkuehto: Etunimi on vähintään 2 kirjainta, joissa ei numeroita tai erikoismerkkejä muita kuin '-'-
+     * Loppuehto: Olion etunimi on nyt parametrina annettu merkkijono.
+     */
+
+    public void setEtunimi(String etunimi) throws IllegalArgumentException{
+        if (etunimi == null || etunimi.isEmpty()) throw new IllegalArgumentException();
+        this.etunimi = etunimi;
+    }
+
+    /* Alkuehto: Sukunimi on vähintään 2 kirjainta, joissa ei numeroita tai erikoismerkkejä muita kuin '-'-
+     * Loppuehto: Olion sukunimi on nyt parametrina annettu merkkijono.
+     */
+    public void setSukunimi(String sukunimi) throws IllegalArgumentException{
+        if (sukunimi == null || sukunimi.isEmpty()) throw new IllegalArgumentException();
+        this.sukunimi = sukunimi;
+    }
+
+    /* Alkuehto: Opiskelijanumero koostuu numeroista 0-9.
+     * Loppuehto: Olion opiskelijanumero on nyt parametrina annettu merkkijono.
+     */
+    public void setOpiskelijaNumero(String opiskelijaNumero) {
+        this.opiskelijaNumero = opiskelijaNumero;
+    }
+
+    /* Alkuehto: Syntymavuosi > 1800 ja pienempi kuin nykyinen vuosi.
+     * Loppuehto: Olion syntymavuosi on nyt parametrina annettu integeri.
+     */
+    public void setSyntymavuosi(int syntymavuosi) {
+        this.syntymavuosi = syntymavuosi;
+    }
+
+
+}
+
+
diff --git a/src/main/java/fi/utu/tech/ooj/exercise2/Sorter.java b/src/main/java/fi/utu/tech/ooj/exercise2/Sorter.java
new file mode 100644
index 0000000000000000000000000000000000000000..3fa83e95b7d576828599cbf569797ac703559a2e
--- /dev/null
+++ b/src/main/java/fi/utu/tech/ooj/exercise2/Sorter.java
@@ -0,0 +1,37 @@
+package fi.utu.tech.ooj.exercise2;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public class Sorter {
+
+    /*Tehtävä 7. Suunnittele ja toteuta tarvittavat testit alla olevalle triangleSort rutiinille. */
+
+    /* Alkuehto: true
+     * Loppuehto: palauttaa kokonaislukutaulukon, joka sisältää syötteenä annetun taulukon alkiot, jotka ovat
+     * ala- (limitLow) ja ylärajan (limitHigh) välissä, järjestettynä niin että määrättyä rajaa (middlePoint)
+     * pienemmät alkiot on järjestettu nousevaan järjestykseen ja rajaa suuremmat laskevaan järjestykseen. Raja-alkio
+     * kuuluu pienempien alkioiden joukkoon.
+     */
+    public static int[] triangleSort(int[] arr, int limitLow, int middlePoint, int limitHigh) {
+        List<Integer> smallerNumbers = new ArrayList<>();
+        List<Integer> largerNumbers = new ArrayList<>();
+        for (int number: arr) {
+            if (number >= limitLow && number < middlePoint) {
+                smallerNumbers.add(number);
+            }
+            else if (number <= limitHigh && number > middlePoint ) {
+                largerNumbers.add(number);
+            }
+        }
+        Collections.sort(smallerNumbers);
+        Collections.sort(largerNumbers);
+        Collections.reverse(largerNumbers);
+        return Stream.of(smallerNumbers, largerNumbers).flatMap(x -> x.stream()).collect(Collectors.toList()).stream().mapToInt(i -> i).toArray();
+    }
+
+
+}
diff --git a/src/main/java/fi/utu/tech/ooj/exercise2/StringMagic.java b/src/main/java/fi/utu/tech/ooj/exercise2/StringMagic.java
new file mode 100644
index 0000000000000000000000000000000000000000..0808956149446de2401364b4da57d159c0294dee
--- /dev/null
+++ b/src/main/java/fi/utu/tech/ooj/exercise2/StringMagic.java
@@ -0,0 +1,37 @@
+package fi.utu.tech.ooj.exercise2;
+
+import java.util.Arrays;
+
+public class StringMagic {
+
+    /*Tehtävä 8. Suunnittele ja toteuta tarvittavat testit alla olevalle piraterize rutiinille. */
+
+    /* Alkuehto: true
+     * Loppuehto: palauttaa seuraavalla tavalla muunnetun merkkijonon: Muunnoksessa merkkijonosta poistetaan
+     * erikoismerkit, kirjaimet muutetaan pieniksi kirjaimiksi. Vokaaliloppuisiin sanoihin lisätään
+     * suoraan loppuun 4 r-kirjainta. Konsonanttiloppuisista sanoista poistetaan viimeinen kirjain
+     * ja sen jälkeen lisätään 4 r-kirjainta.
+     * Numeroja ei muuteta.
+     */
+        public static String piraterize(String input) throws IllegalArgumentException{
+            if (input == null) {
+                throw new IllegalArgumentException();
+            }
+            String cleanInput = input.replaceAll("[^a-zA-Z0-9 ]", "").toLowerCase();
+            String[] words = cleanInput.split(" ");
+            String output = "";
+            for (String word: words) {
+                if ("aeiouåäö".indexOf(Character.toLowerCase(word.charAt(word.length() - 1))) != -1 ) {
+                    output += word + "rrrr ";
+                }
+                else if ("0123456789".indexOf(Character.toLowerCase(word.charAt(word.length() - 1))) != -1 ) {
+                    output += word + " ";
+                }
+                else {
+                    output += word.substring(0,word.length()-1) + "rrrr ";
+                }
+            }
+            return output;
+        }
+}
+
diff --git a/src/main/java/fi/utu/tech/ooj/exercise2/VuosiKurssi.java b/src/main/java/fi/utu/tech/ooj/exercise2/VuosiKurssi.java
new file mode 100644
index 0000000000000000000000000000000000000000..720e86b9602a7c7e82ec8254d1b3103a3a216f7e
--- /dev/null
+++ b/src/main/java/fi/utu/tech/ooj/exercise2/VuosiKurssi.java
@@ -0,0 +1,95 @@
+package fi.utu.tech.ooj.exercise2;
+
+import fi.utu.tech.ooj.exercise2.Opiskelija;
+
+import java.util.ArrayList;
+
+public class VuosiKurssi {
+
+    /* Tehtävä 3 Määrittele luokkainvariantti
+     *
+     * Luokkainvariantti: kurssinAloitusvuosi < nykyinen vuosi. opintoOhjaajanNimi on vähintään 2 merkkiä, ei sisällä numeroita 0-9 tai erikoismerkkejä muita kuin '-'.
+     */
+    private int kurssinAloitusvuosi;
+    private String opintoOhjaajanNimi;
+    private ArrayList<Opiskelija> opiskelijat;
+
+    /*GETTERIT*/
+    public ArrayList<Opiskelija> getOpiskelijat() {
+        return opiskelijat;
+    }
+    public int getKurssinAloitusvuosi() {
+        return kurssinAloitusvuosi;
+    }
+
+    /*SETTERIT*/
+    public void setKurssinAloitusvuosi(int kurssinAloitusvuosi) {
+        this.kurssinAloitusvuosi = kurssinAloitusvuosi;
+    }
+
+
+
+    /* Tehtävä 4
+     * Määrittele  alku- ja loppuehdot lisaaOpiskelija rutiinille
+     *
+     * Alkuehto: Opiskelijaolion luokkainvariantti täyttyy.
+     * Loppuehto: Käyttökelpoinen opiskelija-olio on lisätty opiskelijalistaan.
+     */
+    public void lisaaOpiskelija(Opiskelija opiskelija) {
+        this.opiskelijat.add(opiskelija);
+    }
+
+    /* Tehtävä 5 Toteuta tämä rutiini
+     * Tehtävä 6 Lisää lisääOpiskelijaTurvallisesti-rutiiniin poikkeuskäsittely
+     *
+     * VuosilKurssi-luokkaan halutaan lisätä lisääOpiskelijaTurvallisesti-rutiini.
+     *
+     * Rutiini lisää opiskelijan vuosikurssille samoin kuin olemassa oleva lisaaOpiskelija-rutiini,
+     * mutta tämän rutiinin alkuehto on true. Toteuta rutiinin niin, että se turvaa aiemmassa tehtävässä
+     * määrittämäsi luokkainvariantin voimassaolon.
+     *
+     * @.pre true
+     * @.post true
+     *
+     */
+    public void lisaaUusiOpiskelijaTurvallisesti(String etunimi, String sukunimi, String opiskelijaNumero, int syntymavuosi) throws IllegalArgumentException {
+            if (etunimi.length() < 2)
+            { throw new IllegalArgumentException("Sopimaton Etunimi") {
+            return void; }
+            }
+            for (char a : etunimi.toCharArray())
+                { if ( a == {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'})
+            { throw new IllegalArgumentException("Sopimaton Etunimi") {
+            return void; }
+            }
+                }
+            if (sukunimi.length() < 2)
+            { throw new IllegalArgumentException("Sopimaton Sukunimi") {
+            return void; }
+            }  
+            for (char a : sukunimi.toCharArray())
+                { if ( a == {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'})
+            { throw new IllegalArgumentException("Sopimaton Sukunimi") {
+            return void; }
+            }
+                }
+
+            for (char a : opiskelijaNumero.toCharArray())
+                { if ( a != {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'})
+            throw new IllegalArgumentException("Sopimaton Sukunimi") {
+            return void; }
+                }
+            if (int syntymavuosi < 1800) {
+            throw new IllegalArgumentException("Sopimaton Syntymavuosi") {
+            return void; }
+            }
+            if (int syntymavuosi > 2024) {
+            throw new IllegalArgumentException("Sopimaton Syntymavuosi") {
+            return void; }
+            }
+            Opiskelija opiskelija = new Opiskelija(etunimi, sukunimi, opiskelijaNumero, syntymavuosi);
+            this.opiskelijat.add(opiskelija);
+
+
+    }
+}
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
new file mode 100644
index 0000000000000000000000000000000000000000..df0148796617f79ddd73b73081518b7d3d27b748
--- /dev/null
+++ b/src/main/java/module-info.java
@@ -0,0 +1,4 @@
+module fi.utu.tech.ooj.exercise1 {
+    exports fi.utu.tech.ooj.exercise2;
+    opens fi.utu.tech.ooj.exercise2;
+}
diff --git a/src/test/java/fi/utu/tech/ooj/exercise2/SorterTest.java b/src/test/java/fi/utu/tech/ooj/exercise2/SorterTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..87885961e2e02a357dfe193e76a9bd783b04599b
--- /dev/null
+++ b/src/test/java/fi/utu/tech/ooj/exercise2/SorterTest.java
@@ -0,0 +1,13 @@
+package fi.utu.tech.ooj.exercise2;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class SorterTest {
+
+    @Test
+    void dummyTest() {
+        assertEquals(1, 1);
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/fi/utu/tech/ooj/exercise2/StringMagicTest.java b/src/test/java/fi/utu/tech/ooj/exercise2/StringMagicTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..80dd8109b87b957f14b544ac42aab0e60a9f68ac
--- /dev/null
+++ b/src/test/java/fi/utu/tech/ooj/exercise2/StringMagicTest.java
@@ -0,0 +1,11 @@
+package fi.utu.tech.ooj.exercise2;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+class StringMagicTest {
+    @Test
+    void dummyTest() {
+        assertEquals(1, 1);
+    }
+}
\ No newline at end of file
diff --git a/src/test/resources/jqwik.properties b/src/test/resources/jqwik.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391