Skip to main content

Hello World


1. Getting Started


Goals

The purpose of this assignment is to introduce you to coding in Java and familiarize you with the mechanics of preparing and submitting assignments. The specific goals are to:


Piazza

The class discussion board is hosted on Piazza. If you are not enrolled in the Piazza course, you may sign up here.

Use Piazza to:


Software Setup

We will be using Codio this semester - you should already be enrolled in the Codio course. Please contact the course staff if you are not.

Non-SEAS Students: Request your SEAS account here. It usually takes at least 30 minutes for your account to be activated. Even if you do not plan on using the lab computers, you should request an account now. If your own laptop stops working for any reason, you will be relieved to have immediate access to the lab computers. (Per SEAS policy, SEAS accounts are available only to registered students (including P/F), but not to auditors.)


2. Hello, World!

Program Overview and Setup

This part of the homework walks you through completing your first program! Traditionally, the first program anyone writes in a new language just prints, “Hello, World!” to the interactions pane.


3. Example Drawing

The cis110 jar file sets up tools to help you draw graphics and play sound (StdDraw and StdAudio) that are very simple to use. For CIS110, however, we will be using a drawing library that we have called PennDraw. Before you make your own drawing, you will study our example drawing of a house to understand how the PennDraw library works.

To do this part of your HW:

  1. Click Compile in the Codio dropdown.
  2. Click Run MyHouse in the Codio dropdown.
  3. Click View Running Program next to Run MyHouse.
  4. You should see a drawing appear in a new window. If so, close the window and continue with the assignment. If not, we’ll be happy to help you.

We have provided you with example code in MyHouse.java to make sure that drawing is working on your computer. It also gives you some examples of what can be drawn using the PennDraw library. Read the PennDraw wiki to see what you can draw (i.e. shapes, images, text…) using PennDraw. The wiki page lists all of the functions you can use and explains how to use them.

Open the file MyHouse.java in Codio. Make sure to update the header section so that it is your name, PennKey, and ensure that the provided code compiles and runs on your computer. Pay attention to the comments in the code (the text that begins with “//” which appears in green) as they will help you understand what each line of code contributes to the drawing you see.


4. Your Own Drawing

You will now write your own program which will create a drawing (like the one you saw in MyHouse.java).

My Sketch Specifications

Create a new file in Codio (File -> New File) and name it MySketch.java. Use your HelloWorld and MyHouse programs to guide you in writing this new program. Design and create your own piece of digital art using Java and the PennDraw library. Think of yourself as a creative designer when choosing the topic of your design.

This is your very first program, so here are some guidelines:

Here are some ideas to get you started:


Readme

Every assignment will have an accompanying readme file that you will fill out and submit. This is a required part of the assignment and it usually takes only a few minutes. Among other things, the readme is where you can give any comments or feedback you have on the homework.


Submission

All homework will be submitted to Gradescope. Some time this week, you should have received an email from Gradescope notifying you that you’ve been added to “CIS110 Fall 2020 on Gradescope”. The email contains a link to set up your password. Once you set your password, you will have an account linked to your Penn email (the one which received the email) and you’re all set up to submit. Complete the following steps to submit your HW00 assignment: