1B1a Programming I 2003

Mini-Project


Deadline: The printed version of your work must be handed in to the departmental office by noon Friday 12th December 2003 (the last day of term). In addition, a version should be submitted electronically using the handin program (details will be emailed closer to the deadline). Note that the electronically submitted version of your program will be run through an automated plagiarism detector.

Aim: You are asked to write a program of greater complexity than those you have typically been writing to answer the Exercise questions. Your program might be a larger one-class program or it might consist of a small number of classes. The design of your program will require more thought and planning, and at least the use of methods.

Marking: The work will be graded A-F.
On this scheme a grade C is considered to be basically satisfactory which means the program runs, does the more or less the right things and has a reasonable design using methods and possibly several classes. Grades B and A represent better and excellent programs, while D and E are progressively less good programs that show serious problems in execution and/or design. Grade F means a failure to present anything of merit.

Getting a good grade: Marking will take into account the quality of the program you write. In particular pay attention to the following:

A clean simple working program, making good use of methods, classes and objects, is considered better than a larger and more complex but less well-organised program.

Development Advice:

Tools

As you start working with classes and larger programs you are encouraged to try the BlueJ tool. This is designed for use by people learning to write object-oriented Java programs and is very straightforward to use. BlueJ can be run on a lab machine by typing the command bluej. BlueJ is also included on the programming CD for installation on your own computer.

More information about BlueJ and the user manual can be found at: http://www.bluej.org/.

The Mini-Projects

Below are listed a number of mini-project ideas. The projects are rated using Easy, Medium and Hard.
An Easy project is easier to do but must be done well to get a higher grade.
A Medium project is more demanding, so producing a reasonable working solution is more likely to get a higher grade.
A Hard project is even more demanding, so working solutions will given appropriate credit.

The project descriptions are deliberately fairly open-ended, providing scope for the project idea to be extended if you feel able.

A number of the projects involve using data files. See the web pages about the classes FileInput and FileOutput to find out how to read and write files.


Easy

1. Write an interactive program that functions as a simple CD or DVD catalogue, storing a collection of titles, artist/star information, track names, etc. It should be possible to search the catalogue.

2. Write a program that can parse and evaluate mathematical expressions, written in a textual form (e.g., SQRT(10 * 11) + SQR(5)). Simple expressions might make use of numbers and functions such as log or sin, while more complicated expressions might involve variables.

3. Write a drawing program that can display at  least two different kinds of graph using a data set that is stored in a data file. The program should read the data file to draw a graph.

 

Medium

4. Write a four-function calculator program (+,-,*,/) that works with Roman Numerals, e.g., IV + V = IX. The Roman numerals should be stored as Strings and the mathematical operations should work on the Strings and characters. You should not convert the Roman Numerals to decimal numbers in order to perform the operations.

5. Modify and extend the Robot program, so that it can create and display random mazes of different sizes, and implements a robot algorithm that finds and displays the path through any of the mazes.

6. Write a program that might be used by a delivery service to store information about parcels to be delivered to customers in the local area, and to plan delivery routes to minimise the distance travelled by the delivery van.

 

Hard

7. Write a program which will take as input a text file and will check whether the words in the text are correctly spelt and if not, what might be correct versions. A good spell-checker should be able to not only identify words that are incorrectly spelt, but also suggest corrected versions. (Note there is a large list of words in the file /usr/dict/words.)

8. Write a painting program, with a graphical user interface (GUI), that allows pictures to be drawn interactively (using lines, curves, boxes, colours, etc.). It should be possible to load and save pictures.

9. Write a program to do timetable planning for University departments such as Computer Science. Given lists of courses, lecture theatres (with fixed capacity), students (taking a variety of degrees and courses), and any other information needed, the program should attempt to create a timetable satisfying as many constraints as possible. Example constraints include lecture clashes, avoiding too many or too few lectures in one day for most students, making sure lecture theatres are big enough, and so on. Use the data from the CS timetables to test your program.