c m s c 311
s p r i n g 2 0 0 2
You should have completed project 1. So, when you submit project 2, make sure that it produces the output based on project 1, given the primary (or something close). Recall the primary output of project 2 consists of two parts: the first part is merely a repeat of project 1. The second part is the output of the assembly language program.
It would be nice to get primary on that, but few people are making a lot of progress. At this point, I'm inclined to say it will cost no more than 1/3 of a letter grade if you don't get ALL of primary to work (for most of you, 1/3 will not affect GPA, but if you have a B-, it may slip to a C+), but do get the part of the primary output corresponding to project 1 to work.
If you passed based on your exams alone, I will say it's OK to pass the course, provided some semblance of project 1 came in. If you don't have any project turned in (or it does nothing), your grades will simply have to be higher to pass the course.
If you do a good job on the project, you can get a boost in your grades based on cutoffs from exam.
(5/15) Do I need to pass primary to submit?
No, the submission program only checks that p2 is created. It doesn't do any more than that. At the very least, try to submit something that prints the first part (the output from Project 1) without core dumping on the primary input.
I would like to grade P1 by looking at P2 (this gives you a chance to fix problems with P1).
You need to handle two kinds of offsets: base 10 integers and labels. Fortunately, labels begin with letters so you can distinguish the two.
Please do. This is how you do it. Write a function that takes a string as an input, and looks for the first occurrence of "\n" (which contains two characters). Have a substring before that (call it s1) and a substring after that (call it s2) and then concatenate.
For example, if the string were "hi\n there" then s1 would be "hi" and s2 would be " there" (notice the space, and the result would be s1 concatenated with a real string that has a newline character (in C++ and Java this should simply be "\n") concatenated with s2.
Once you have this function, it's a matter of repeatedly calling it until no changes were made. It should take maybe 20 minutes (up to an hour) to write a function like this.
The point of this is to illustrate that when you read a file, you see two characters (backslash and n) and when you use "\n" in a program, it's translated to the ASCII representation of the newline character instead of being considered two characters.
See the class syllabus for policies concerning email
Last Modified: Sun Mar 3 22:54:00 EST 2002