CSE 143, Homework 1

Reconstructing STAR


introduction | objectives | overview | specifications | written work
resources | hints and tips | submission | files | announcements

introduction

Just when UW's computing people thought they had survived the ILOVEYOU virus, disaster struck again with the lethal MAYBEWECOULDGRABCOFFEESOMETIME virus. Although its name might suggest that it is less potent, it is actually a much more destructive variant of the ILOVEYOU virus. The virus hit the Registrar's computers hard, and the software that powers the STAR telephone registration system was irrecoverably lost, leaving thousands of students stranded and deprived of the fun of listening to the soothing, mechanical STAR man voice read out letters and numbers.

To contribute to the attempt to recode the STAR system, the CSE department is offering the expert coding services of its 143 students to aid the university computing staff. They have asked you, specifically, to reconstruct the code that warns users when courses they choose have time conflicts---a small but crucial piece of the system.

objectives

In addition to saving the university from chaos, these concepts and technical knowledge are the focus of this homework:

*These should already be familiar to you from CSE 142.

overview

You are given code that reads a course schedule data file and initializes an array of structs, where each array element stores data (i.e. name, meeting time, duration) for a course.

You are responsible for writing code that accomplishes the following:

specifications

The following code is provided below in the files section:

You are also provided with a sample data file for testing. Note the format of the data files: plain text files where each course has two lines: the first for the course name, the second for two integers, where the first is the meeting time and the second is the duration of each meeting in hours. The first number is a time on the hour in 24-hour format, e.g. 13 means 1:00 pm, 8 means 8:00 am. An example entry from a data file might look like this:

Music History 508
14 2

This course, Music History 508, meets at 2:00 pm (14:00 in 24-hour format) for 2 hours.

You are also given a sample executable. When complete, your program should run exactly like the sample executable, down to the formatting of the output. Study it carefully by running it on the sample data file and make sure you understand what you are supposed to accomplish before starting work. (Make sure the data files are in the same directory as the downloaded executable.)

Your programming tasks are the following, not necessarily in this order:

Your program should operate correctly with any data file that is in the right format. When we grade the program, chances are we will not use the given schedule1.txt file! 

Your program does not have to operate correctly in the presence of data errors. Another way to say this is, if there is anything the least bit wrong with the data file, it's OK if your program blows up. The sample program blows up in those cases, too. In future assignments, we'll ask you to make your programs increasingly robust, however.

On the technical side, you will also need to create a project that links all of the source files together and builds a program which operates more or less exactly like the sample executable.

In addition to testing your program with the provided test data, you should create test data files of your own.  Pick one of these to turn in (the turn-in form will refer to it as courses.txt).

Make sure to fulfil the following important requirements:

written work

In addition to your turn-in receipt print-out, you are required to submit the following on paper.  This may be handwritten if it is 100% legible.  If your TA can't read it easily, he may require you to resubmit it word-processed.  It must be on a separate sheet of paper, and not embedded in comments in the program.  Please write your name and section on the sheet.

  1. It may be that your project does not meet the specifications given above. Write a short statement that either says you are in full compliance with the requirements, or lists the ways in which you are not (things that don't work, etc.). Such a statement will be a required part of every programming homework. For this homework, make sure to point out at least two places in your code where you use assert.

  2. You may decide that the program you turn in is not ideal in some respects. If your boss or fellow programmers were looking at it, what do you think they would find to like or dislike? Write a short paragraph evaluating the project. You could focus on the way it's designed and programmed, or focus on what usefulness the program has. Your critique will be graded (this time) only on whether you attempt it.

  3. Write a statement of acknowledgements. If you took code from anywhere (except what the assignment gives you directly), say where you got it from and who the original author is. You must do this even if you modified the code considerably. If you received help on the assignment from anyone other than course staff (TA, instructors, consultants), please list the name of the person and the extent of their help. Such a statement will be a required part of every programming project.

resources

Rusty on sorting? You'll find extremely relevant examples in the "Array of Structs" lecture from CSE 142. Some of the C string.h library functions might also be useful.

hints and tips

An important note about the data files: The last line of the file must not be followed by a line-feed. In other words, the very last line of the file should not be blank but should contain the meeting time and duration of the last course.

If a schedule file contains a set of three or more courses which are all in conflict, your program is still considered correct as long as each of the courses appears at least once in the list of reported conflicts. This means, in particular, that your program does not always have to report all pairs of conflicting courses.

There's no need to get fancy with this assignment. Follow the instructions carefully and get it to work. There is a draft style guide for CSE 143 linked on the Homework page; you should begin to get familiar with it. Minimally, make sure that your code is commented clearly and is easy to read.

Start early, and good luck! Bring STAR man back to us.

submission

As always, be sure to read the official homework submission policy, linked on the course web on the Homework page. This page has very important instructions about how you should package your paper submission. You will have to submit your work (1) via the web using the page linked below and (2) on paper.

You should be submitting the following files through web turn-in.  The form will not accept any other files:

Your paper submission should consist of the following:

As stated on the official homework submission policy page, all parts and pages of your paper submission must be stapled together and sealed in a large envelope. (Don't expect the TA to have a stapler in section, either!)  You can lose points for not following these instructions (crazy, but true!)   For this homework, you will submit your paper submission in quiz section on the due date at the top of this page. 

files


announcements

If any clarifications or changes need to be made for this homework, they will be mentioned on the cse143-announce e-mail list and linked here.


Return to main Homework page...
Last modified: Tue Jun 20 19:56:01 PDT 2000

Save paper. Read documents on the web and, if you must print, print two-sided. Recycle this when you're done.