COMP1400 – Programming for Designers

Class announcements for Programming for Designers

COMP1400 – Programming for Designers random header image

Lab Wk 12 – Uno Game

October 7th, 2012 · No Comments · Uncategorized

Download the Uno Game BlueJ project shown in the lecture. Constructors Use the debugger to watch how cards are constructed: Set a breakpoint in the WildDrawCard constructor (line 17). Create a new WildDrawCard by calling the constructor.. Use the ‘step into’ button to step through the code. Observe how the super() call works. Repeat this […]

[Read more →]

Tags:

Wk 11 – Wumpus with Interfaces

October 3rd, 2012 · No Comments · Lectures

I finished re-implementing the Wumpus game using the Hazard interface we discussed in today’s lecture. You can find the complete source here. I have also uploaded revised slides containing the changes I made during the lecture.

[Read more →]

Tags:

Tut Wk 11 – Wumpus

October 1st, 2012 · No Comments · Lab

Download the Wumpus game shown in lectures. Examine the code try to follow how it works. Make the following changes to the game: Rearrange the rooms so that are in a 4×5 grid. Make it so that the wumpus needs to be shot more than once (you choose how many times) to be killed. Each […]

[Read more →]

Tags:

Long weekend and Tut 11

September 25th, 2012 · No Comments · Lab

If you are in one of the Monday tutorials, your usual class will not be running next week as it is the long weekend. You are welcome to turn up to one of the other tutorial times: Tue 10:00 – 12:00 Mabu Lab Elec Eng 455 Tue 14:00 – 16:00 Leaf Lab Mech Eng Undercroft […]

[Read more →]

Tags:

Tut Wk 10 – Scrabble

September 23rd, 2012 · No Comments · Lab

Consider the game of Scrabble. List all the data involved in representing the game. Be thorough. How might this data be divided into abstract chunks? What idea does each chunk represent? Draw a flow chart of the game play. Break it up into methods of different levels of detail. How do these methods associate with […]

[Read more →]

Tags:

Assignment 3 – DRAFT

September 19th, 2012 · No Comments · Uncategorized

In this assignment you will be implementing a simple job queue using objects and array lists. Due date: Midnight Sunday Oct 14 (end of week 12) Topics covered This assignment covers the following ideas: OO design: Abstraction and encapsulation Implementing a class with fields, constructors and accessor methods, Handling collections of objects with ArrayLists, Implementing […]

[Read more →]

Tags:

Tut Wk 9 – Classes and Lists

September 16th, 2012 · No Comments · Lab, Uncategorized

Classes Consider a database of student records for the university. What kind of data would be associated with each student? Download the Lab9 BlueJ project. It defines a new class Student which contains some student information Create students a number of students in BlueJ. Use the Inspector to examine their fields. Use the getName() method […]

[Read more →]

Tags:

Week 8 Tut – Objects

September 9th, 2012 · No Comments · Lab

Create an instance of the java.util.Random class in BlueJ using the Tools > Use Library Class… option. Right click on the object created to see its methods. Try running some of them. What do they do? Read the Java docs for the Random class. Which method would you use to: Simulate a fair coin toss? […]

[Read more →]

Tags:

Assignment 2

August 23rd, 2012 · No Comments · Assignments

NOTE: This assignment is due by midnight Friday Sunday Sept 16 (the end of week 8). [Corrected] For this assignment you will write a program that implements Conway’s Game of Life. The board is a rectangular array in which a cell is designated as either live or dead. A few simple rules tell you how […]

[Read more →]

Tags:

Tutorial Wk 7 – ASCII Art

August 22nd, 2012 · No Comments · Lab

In this tutorial we will be working with 2D arrays to do some image manipulation. Download the BlueJ project ASCIIArt.zip. Inside you will find a class that contains the method readImage(String url). This method takes the URL for any image on the web and converts it into a 2D array of integers. Each entry in […]

[Read more →]

Tags: