COMP 14: Introduction to Programming. Assignments

Homepage

Assignment Policies
There will be 7 homework assignments, which will be posted regularly on this page.

Source code, as well as reports, must be turned in at class-time or by midnight on the due date, at otaduy@cs.unc.edu.

No late assignments are allowed.

Assignment 7 (due June 11)

Euros and Dollars.
Download the assignment from here.
Your Java applet should look something like this.

Assignment 6 (due June 9)

Study by Student Health Central.
Download the assignment from here.
These are test files that you will need in the assignment: ints.txt   study1.txt   study2.txt   study3.txt
Feel free to generate your own test files too.

Assignment 5 (due June 2)

ACC Tournament.
Download the assignment from here.
One of the classes needed in the assignment is Team.java.
You have to submit a .jar file including the project file (.gpj), and the source code files (.java).
Here you will find directions to create a project with multiple files in jGRASP, and to archive it in a Java archive (.jar).

I have added some guidelines to approach a programming problem in an object-oriented manner.

Assignment 4 (due May 26)

Tic-tact-toe.
Download the assignment from here.
You have to submit the .java file with the final program and a document with the algorithm and a short report.
This is the file TicTacToeBoard.java that you may want to use for part of the assignment.

Assignment 3 (due May 20)

Calculator.
Download the assignment from here.

Part of the material for this assignment will be covered in class on May 18.
You can start the assignment by assuming that the operand is always +, and add
the rest of the functionality after May 18.

Assignment 2 (due May 16)

Algorithms and Your First Java Program.
Download the assignment from here.
This is the file Binary.java that you will need to complete the assignment.
Hint: the binary to decimal conversion bears some similarity with the coins problem discussed on May 12.

You can check that your program behaves as you expect by tracing the values of variables during execution.
To do this, run the debugger in jGRASP.
Check section 2.10 in the jGRASP tutorial to learn how to use the debugger.

Assignment 1 (due May 13)

Fill in personal info form.

Get started with jGRASP.
If you have a PC, follow the jGRASP installation guidelines.
Write a short report (1/2-1 page) describing the problems you had while getting started with jGRASP.
You may also want to get access to AFS disk space. To do so, follow the AFS guidelines. (This is not mandatory)

Also, type the two examples given below, compile and run them. Create some errors (at least 3, one at a time) in the program and report the messages given by jGRASP.
Two program examples: FirstClass.java and FancyFirstClass.java

Homepage