---
# System prepended metadata

title: Lecture 2 Setup/Prep
tags: [Setup]

---

---
tags: Setup
---

# Lecture 2 Setup/Prep

In lecture 2, we will learn 
- how to set up and run Java programs in IntelliJ
- how to write functions (called methods) in Java

There are two starter files:
- [Dillo.java](https://brown-cs18-master.github.io/content/lectures/02methods/initcode/Dillo.java)
- [AnimalTest.java](https://brown-cs18-master.github.io/content/lectures/02methods/initcode/AnimalTest.java)

These are extended versions of the `Dillo` and `AnimalTest` classes from the previous lecture. They are extended in that:
- The `Dillo` class includes the `canShelter` function from the initial Pyret/ML example
- The `AnimalTest` class includes the code we need to run tests against the `Dillo` class

We will go over these files and how to run them. **We do NOT expect that you understand everything in these files at this point**: that's what we'll do in class.

## Prep
- You may want copies of these files in a form such that you can annotate them with notes on what the different pieces do
- Look at the files just to get familiar with the new pieces (again, you aren't expected to understand them yet) 
- Since we haven't yet shown how to set up files in IntelliJ, don't feel you should do that before class (I'll demo that in class). If you do want to set these up inside IntelliJ itself before class, you'll want to have a project for your lecture notes, a package called `lec02` inside that project, and these two files in the `lec02/src` directory.  

