School of Engineering and Applied Science
Department of Computer Science
CSci 190 -- Real Time Computer Systems
http://www.seas.gwu.edu/~csci190
Prof. Michael B. Feldman
mfeldman@gwu.edu

Spring 2003

Programming Exercise
due dates: 
Feb. 19, 2003 (Ada 95)
Mar. 26, 2003 (Java)

It is, I hope, a safe assumption that advanced undergraduates and graduate students in Computer Science and related fields are able and willing to learn programming languages quickly.

The idea in this project is to get to know the concurrency and realtime aspects of Ada 95 and Java, by setting up some sort procedures, starting them, and watching them run "simultaneously" by displaying the current states of the arrays they’re sorting at appropriate times. We want to have a “race” between the sort algorithms, and observe the race in progress. The screen might look like this at the start of the race:
 

         +------------------------------------------------------+           
         |Bubble Sort                                           |
         |------------------------------------------------------|
         | FONOCPFXSSJTPPGXVPRHNUMNYZBLYKUDIENVZVGAXEYLNCUKOSEX |
         +------------------------------------------------------+
         +------------------------------------------------------+           
         |Quick Sort                                            |
         |------------------------------------------------------|
         | FONOCPFXSSJTPPGXVPRHNUMNYZBLYKUDIENVZVGAXEYLNCUKOSEX |
         +------------------------------------------------------+
         +------------------------------------------------------+           
         |Shell Sort                                            |
         |------------------------------------------------------|
         | FONOCPFXSSJTPPGXVPRHNUMNYZBLYKUDIENVZVGAXEYLNCUKOSEX |
         +------------------------------------------------------+
 

At the end of the race all arrays will be sorted in ascending order. You can run my version of this program from a hobbes terminal window by typing ~csci190/sort_race.

In the program library for this course on the Unix network, located in ~csci190/adasource/sorting and ~csci190/javasource/sorting, you will find several sort routines, a “mini-device driver” for VT100-type terminals, a simple window manager, and other stuff, all in the applicable language. You can use them on our system or download them to PC’s, etc. The Ada source code is there now; the Java code will follow later in the semester.

Aid and comfort will be given in class during the tutorials.

Submitting your programs

You can submit your programs electronically, but because I must read a lot of these, please follow the instructions below to make your submission easy to read, run, and understand.
  1. If you developed your program on hobbes, it's already in a directory called adasource or javasource or some such thing. If your program is not on hobbes, please upload it to hobbes and put everything in one subdirectory. Make sure this directory is self-contained, that ALL your source code is there. Obviously you don't need to incolude the Ada or Java standard libraries, but all the user code must be there.
  2. Write a brief report as a text file, and call it README.txt. Make sure to indicate how to compile and run it. Put it in the same directory with your source code. Do NOT include a Word file or other non-text format! I want to be able to read it on hobbes.
  3. Now move up one level above your directory (type cd ..) and zip it into an archive with a uniform file name. Let's say your name is Smith. For your Ada submission, type
    zip -r 190s03ada-smith.zip adasource (or whatever your directory is called)
    zip -r 190s03java-smith.zip javasource (or whatever your directory is called
    This will recursively zip up the entire directory into a zip file. The uniform name will let me store all the files so I can tell at a glance what each one contains.
  4. Now transfer the zip file into my ftp directory on the SEAS ftp server. Type
    ncftp ftp.seas.gwu.edu
    then, when you are logged into the ftp server, type
    cd pvt/ada717
    then type
    put 190s03ada-smith.zip or
    put 190s03java-smith.zip
    then leave the server by typing
    quit
  5. Finally, please e-mail me to let me know you've deposited your submission.
Thank you for your cooperation!