Cmpe 250 Project 1

 

Due Date: 12th July

 

Project Description:

 

This first project of the Cmpe 250 course aims to introduce you to Java development. Generally speaking, there are two development areas you should be familiarized with, namely the application mode and the applet mode. In this project you will develop an example from each area.

 

Application Mode:

 

The aim of this part is to let you get experienced with the usage of some Java components, such as panels and buttons. You are to implement four of the following sorting algorithms and assign a button for each of them.

 

Bubble Sort

Heap Sort

Insertion Sort

Merge Sort

Quick Sort

Selection Sort

Shell Sort

 

Starting with a random sequence of integers visible to the user, your program should be able to sort the integers using the algorithm corresponding to the pressed button, and measure the time it takes for the program to finish sorting. The measured time should be displayed as well. Also do not forget to provide ‘reset’ and ‘generate’ buttons to reset the sequence back to its initial ordering (so that time measurement makes sense for comparisons) and create a new sequence. The number of integers in the sequence and the upper limit of integers should also be changeable from the interface. Choose reasonable default values for these (like 20 integers between 0-100).

 

Applet Mode:

 

This part of the project will let you discover the graphics capabilities of Java using the applet technology. You are to develop a simple applet, which renders the well-known matrix code from the movie ‘The Matrix’. To see some examples look at http://www.freenetpages.co.uk/hp/adderz/MatrixApplet.html and http://javaboutique.internet.com/Matrixcode/ . The expected quality is about the same as the Image Matrix Applet provided in the first link above. The aim is to make you use the graphics related objects and file operations of java inside an applet. You don’t need to care too much about the visual quality, but make sure that the main idea of sliding letters works. Also don’t forget to take the letter images from files so that you also learn how to handle files from inside an applet.

 

You should submit your working, commented, ‘as self explanatory as possible’ code, along with sample runs, screenshots and a report explaining your object oriented design as clear as possible, but avoid explaining the obvious parts. Also don’t forget to state your assumptions, if there are any. You should submit all of the above to my (i.e. your assistants) e-mail address with a clarifying subject line, such as “Name Surname Cmpe 250 Project X”. You may also submit all of the above as hardcopy directly to me, since some e-mails sent to the yunus account tends to get lost in cyberspace.