Software Engineering

Databird: A Java Introduction

Due on September 10th at 11:59 PM.

This is an individual assignment. You are to complete this assignment on your own, although you may discuss the lab concepts with your classmates. Remember the Academic Integrity Policy: do not show your work to anyone outside of the course staff and do not look at anyone else’s work for this lab. If you need help, please post on the Piazza forum or contact the instructor. Note that no exception is made for your group members; collaboration with your group members is a violation of the Academic Integrity Policy as much as collaboration with other members of the class. If you have any doubts about what is okay and what is not, it’s much safer to ask than to risk violating the Academic Integrity Policy.


Your task in this assignment is to become familiar with the Java language and IntelliJ, the Java IDE we will be using for this course. You will accomplish this by writing a small application to store and search a database of Twitter posts.

Starting Materials

To begin your assignment, clone the appropriate Git repository from the Swarthmore GitHub server:

git clone<username>.git

Make sure to replace <username> above with your Swarthmore College username.

Your initial repository contains three files:

The Java source files are stored in an appropriate directory structure corresponding to their package.

Configuring Your IDE

You are required to use an IDE for development in this course. In this assignment, we will use IntelliJ IDEA Community Edition, an open source development environment which primarily targets Java but supports a variety of plugins and features.

To protect your disk quota and avoid unnecessary network activity, IntelliJ has been installed in /local on all of the CS network machines. You can run IntelliJ using the following command:

me@computer:~$ /local/intellij/bin/

If you want to create a link to this file so you can launch it more easily in the future, you can create a bin directory in your home directory and it will be added to your PATH of available commands the next time you log in. For instance, the commands

me@computer:~$ mkdir -p ~/bin
me@computer:~$ ln -s /local/intellij/bin/ ~/bin/ij

will create a symlink ij. The next time you log in, you can just run ij from the prompt to start IntelliJ. (If you’ve already created your bin directory in the past, ij should work immediately.)

Creating a Project

After proceeding through the basic IDE configuration dialogs, IntelliJ will present the following welcome dialog:

IntelliJ welcome dialog

To add your repository as a project to the IDE, follow these steps:

  1. Select “Import Project”
  2. Choose the directory where you’ve cloned the assignment
  3. Proceed through the various dialogs to create your project; default settings should suffice.

Once you’ve successfully created the project, your IDE window should look like this:

IntelliJ main window

Completing the Assignment

Your task is to write a small application to load and search the provided Twitter posts. This data is provided as a text file in which each post consists of four lines:

  1. The username of the user who created the post
  2. The screenname of the user who created the post
  3. The time of the post (as a string)
  4. The content of the post (on a single line)

Your application should read the contents of the twitter-data.txt file at startup and present the user with a text-based interface with the following options:

The listings above must appear in chronological order (oldest first). This can be achieved by sorting the list based upon the string representing the post’s time. After satisfying each request, your application should prompt for another.

Your application must also meet the following requirements:

Submitting the Assignment

Assignments in this course will be submitted via the Swarthmore GitHub server. Make sure to commit and push all of your work (including e.g. the .iml project file that IntelliJ creates). The contents of your repository at the due date will determine your grade. As always, please contact your instructor if you have any difficulties.