computer organization
c m s c 311  
s u m m e r   2 0 0 2  

Project #0

Due Tuesday, June 11, 11:59 PM (just before midnight)
Late Due Date Sunday, June 16, 11:59 PM (just before midnight)

Posted: June 5, 2002

Addendum

Read this section frequently to check for updates/corrections/clarifications to the projects.

These are clarifications to various project specs.

Clarifications

Purpose

The goals of the project are:

Academic Integrity Statement

Please note that *all* programming projects in this course (including this one) are to be done independently or with the assistance of the instructional staff of this course only, unless otherwise specified IN PRINT by official webpages.

Please review the policies outlined on the class syllabus concerning the use of class computer accounts and concerning the University's Code of Academic Integrity. The instructors of this course will review the programs submitted by students for potential violations of the Code of Academic Integrity and if it is believed that a violation has occurred it will be referred to the Office of Judicial Programs and the Student Honor Council.

Hardcoding is considered a violation of academic integrity

Project 0?

Why is this called Project 0 instead of Project 1? Traditionally, at Maryland, Project 0 is a simple project (this is a little more complicated than most, however), meant to get you started. Usually Project 1 is more typical of a project in terms of size and complexity.

Changing Finger Information

You should change your finger information. If you use ssh to login, you must login a second time using dce_login (it will request your username and password a second time, and open a new shell). If you use telnet, you do NOT need to dce_login.

To change your finger information, type:

chfn
You should ONLY change your name. Please have your first and last name as you are registered in the system. For example, if you are registered as "Samir Khuller", please use "Samir Khuller" rather than "Sammy Khuller" or "Biff Khuller", even if you prefer to be called "Biff".

Ignore the parts that ask you for your phone number, office, etc. Just hit return, and don't fill anything in.

In addition, you will probably also want to change your password.

passwd
Notice the unusual spelling of "passwd".

This will ask for your original password, then your new password, and the new password again. If you use "ssh", it may take a day or so to take effect (it might work right away though). If you use "telnet", the changes should be immediate.

Specifications

The input to your program comes from an input file sent to your program using input redirection. For example, if the name of your executable is p0 and the name of the input file is input.dat, then you would run your program as:
p0 < input.dat
This should cause your output to be printed to the screen.

Note: you do NOT open a file. Write your program as if the user is typing in commands to your program (i.e., read from standard input). Print output to standard output (i.e., to the screen). Input redirection allows the input to be read from a file WITHOUT having to open the file.

Each line of the input file consists of a command or a blank line. A blank line is defined to be 0 or more blank spaces, ending in a newline character (by definition, a line MUST end in a newline character or EOF). Your program should ignore blank lines and not print any output if blank lines are encountered.

After each command, you should print:

===> (3) Command entered: [endian]
where (3) is replaced by the command number (which begins numbering at 0), and the string in double quotes is the command line from the input file (obviously, it won't always be "endian").

The output should consist of three equal signs, and a greater than sign, then a space, a left parentheses, the command number, right parentheses, a space, then "Command entered:", a space, and the command surrounded by brackets.

The command line should be surrounded by brackets, and should not have any leading or trailing blanks (i.e., don't print [ endian ], print [endian]).

This line will be referred to as the initial output, and should be printed after reading each non-blank line of input.

Your program should handle the following commands:

You should process commands until the end-of-file is reached.

Error handling

If the line does not contain a valid command, then you should print:
*** INVALID COMMAND
instead of printing the initial output. Then, you should process the next command.

The number of the output should not change (i.e., other than printing "*** INVALID COMMAND", the output of your program should be the same as if you had no invalid commands in the input file).

Extensions

One additional feature you can add is to convert numbers with decimal fractions written in base 10 to base 2 as part of the convert. If the numbers repeat, simply stop printing after 15 digits.

(Sample output of this to be posted soon)

Primary Input

A primary input will be posted soon. You must pass this in order to submit the project and have it graded.

Restrictions, etc.

How to Submit

Coming soon!

See the class syllabus for policies concerning email
Last Modified: Wed Jun 5 10:38:37 EDT 2002
left up down right home

Web Accessibility