May 1, 2004


Your Final Exam is posted. 

===>>> It is due to me by email by 6:00 PM today 5/1/2004   <<<===

GOOD Luck!




April 26, 2004


Your last program is posted. It is a program to be write an BASIC language parser

 It is due on 5/8/2004   

Please research on the web what is the BNF for a language. It is basically the 
rules as to how statements are formed in the language. Your job is to write 
an interpreter which follows the rules and scans lines of a program. If there is an error
it must report a meaningful error, otherwise it goes to the next line.

For this assignment, you do not have to be concerned about the proper sequence
of the statements, just the syntax correctness of each statement.

For example, 

200 END
300 END

is correct since each statement is correct, although it would be wrong to have two END
statements next to each other. 

You need to use recursion to write the parser because expressions ARITH and NUMBER
for example are recursive definitions. 

Every staement is first a 

SIMPLE BASIC STATEMENT

then we try to see which of the following it is

LINE NUMBER ASSIGN STATEMENT CR |
LINE NUMBER IF STATEMENT CR |
LINE NUMBER GOTO STATEMENT CR |
LINE NUMBER END STATEMENT CR |
LINE NUMBER READ STATEMENT CR |
LINE NUMBER WRITE STATEMENT CR |
LINE NUMBER GOSUB STATEMENT CR |
LINE NUMBER RETURN STATEMENT CR 

Note that CR is carriage return (or new line character).  The symbol | means OR

The symbol ::= means has the meaning of

So, for example,

EXPRESSION ::= ARITH | ARITH RELATION ARITH

means an expression has the meaning of an ARITH  OR ARITH followed by RELATION 
followed by ARITH.


Create the clkasses necessary to write the program, and you first need to read in the 
BNF into your parser object. You can make a class for every statement in the BNF.

Once you have the BNF stored, you need to read a line and determine if is is 
according to the BASIC syntax or if there is an error. If there is an error, please
output a meaningful message.




April 5, 2004


Your Midterm Exam is posted. It is a program to be written it is in two parts.

===>>> The exam will be due by next Saturday (April 17th)   <<<===




April 5, 2004
Your reading should be through chapter 1-8 for the end of the week.
Your exam will be posted this Saturday, and is due to me by email on Monday 8:00AM.

===>>> The exam will be due by next Saturday (April 17th)   <<<===

Any topics you need help with should be posted on the blackboard.





March 4, 2004
Please see the new handout on binary files and Random access files. This should help understanding 
program assignment #3. This deals directly with Part 1. This part is basically to create a program 
for which I already provided the code. Your job is to understand the code. A good idea is to make 
small changes to see their effect.

Part 2 is the more difficult assignment. I will post a handout on that soon, and I hope to be able
to discuss with you this personally on March 13 in Stamford 1:00 - 3:00. 

Have you been using Blackboard? Most of the students have. I am actively answering questions there!

Go to Blackboard Now  




March 3, 2004

The next week is officially Spring Break at UB, but we will continue our class. Programs #1 and #2 are due
on this Saturday, March 6th. 

Program #3 is assigned today. It has 2 parts. One part is already written for you, and the other part
has to be written. The program is Program #3, Simple File Structures.

I expect that you create a project to include the 4 files given on the assignemnt, Random.h, Random.cpp, 
RationalTest.cpp, and RationalTRest2.cpp. 

Part 1:

You will create 2 programs: 

1.	RationalTest.cpp will be the main

	This program will create 10 random Rational Objects abd that is it. The fioe will b a binary file.

2.	RationalTest2.cpp will be the main

	This program will output the numbers from the binary file to screen, then reread them, and change the 
	Ratioal objects which have the numberator > denominator, and rewrite the file to reverse the values.

	So a file with Rationals:

	(1,3)
	(4,7)
	(7,3)
	(2,9)
	(9,4)

	would be rewritten as 

	(1,3)
	(4,7)
	(3,7)
	(2,9)
	(4,9)

	Of course the files will be binary files so you will not be able to view the data in a text
	editor or a word processor.


Part 2:

	The directions are given on the assignment. I would like to schedule a class to meet at Stamford
	to catch up on any questions you may have.

	Please zsend me email if you are available on 3.13.2004 from 1:00 to 3:00.





Feb 24, 2004
Note that the input for the Polynomial program is at
the end of the assignment. In case you missed it, it is:

a)	3x2 + 2x - 6

b)	15x5 - 13x3 + 2x2 + x

c)	14x5 + 11x4 - 8x3 - 2x2 - x + 1

d)	3x12 - 2x9 + 6x8 - 5x6

e)	x + 2

So you will create 5 Poly objects, then perform all the necessary operations with them, +, -, *, and raise to the 2nd and 3rd powers.



Feb 23, 2004
Everyone has an account on the bb.ctdlc.org system. Please use the 
discussion board. Some already have gotten goos answers on it. I will post whenever I see a 
question. Program #1 (Byte addition) is due this past Saturday, but you have until next
Saturday to email me with the code, input and output files, and any documentation.

The next program is program 2a (to be posted later today. It deals with the Polynomial class
from chapter 4. Read that carefully. I will post

1.	detailed notes on the Polynomial class
2.	Program 2a

later today. Program 2a will be due next Saturday (with a week extension if needed)

Try very hard to complete it by the due date if you can!!

I have found that audio takes up to 1 MB/minute, so I need to find a better format otherwise
the audio notes would take too much space to store and download.



Feb 18, 2004
Good News! The class will run. Every student who is registered has been
sent an email regarding the course. If you are not receiving email from me, let me know ASAP!

Please go to  bb.ctdlc.org and login to see all the discussion groups. I have posted some help in 
program #1, especially the binary addition. If you have any ?'s you can post questions in the  bulletin
board, and other students or I can post our answers.

I will be posting new multimedia handout starting tomorrow. If you have any problems signing onto the 
blackboard account I have created for you, let me know right away.



Feb 14, 2004
Due to the small number of registered students, we delayed the decision as to 
whether to run the class. A decision will be made soon!



Feb 7, 2004
I will set up a Blackboard Account that will be used as a meeting forum. This will be set 
up early next week, and check back here for detailed simple instructions on how to use this class feature. 

This will also explain how you can get help in answering your questions as well as how exams will be taken
You can always send me email (see below) with questions. Please put "CS 400 On-Line" in the subject.

If you are having trouble in the class, please contact me right away. Do not waut until the assignment is
past due. I make every effort to help students who are trying to help themselves