Software packages needed in the course
(all freeware):
CD Resources for
the PDA Programming in C Book |
Assignment-1 (Basic C Programming) - Due Thursday Jan.18 by 11:59pm.
Structured program development (control structures, if-then-else statements, while and for loops).
Submit an electronic copy of this assignment to the course ftp-submission site.
Name the package your FristInitialLastNameAssign1.zip and make sure to submit to the assignment number directory.
Assignment-1 Grading Sheet
Assignment-2
(C Programming--Recursion, Arrays, and
Pointers) - Due Sunday Feb. 4th by 11:59pm.
Recursion
(the Towers of Hanoi problem).
Arrays (the Airline Reservation problem).
Pointers (the Tortoise and the Hare
Simulation problem).
Submit an electronic copy of this assignment to the course ftp-submission site.
Assignment-2 Grading Sheet
Assignment -3 (Build your own computer) - Due Tuesday Feb. 27 by 11:59 midnight.
Requirements
A) Part-1 Machine Language
1) Use a sentinel-controlled loop to read 10 positive integers and compute and print their sum
2) Use a counter-controlled loop to read seven numbers, some positive and some negative, and compute and print their average.
3) Read a series of numbers and determine and print the largest number. The first number read indicates how many numbers should be processed.
B) Part-2: C-Programming
Write the code to interpret/compile the SML programs.
Your C-program should give the user two options to enter the SML code (1 & 2 as follows):
1. Interactively by entering each instruction at the command-line, one instruction at a time.
2. By reading the SML instructions-code from a file. Your program should read all the instructions from the file and proceeds execution.
For specifics on the C-code implementation, more details are in this link.C) Look at the Simpletron Specs with SML (machine language) sample programs.
Assignment-3 Grading Sheet
1) Skeleton Code (myshell.c) --use and build on top of this code to complete the project.
2) Here is a file that is useful for parsing a line of input with
getline()--available here:
lex.yy.c
which contains some code that uses getline(),
a function provided by lex.c to get and parse a line of input.
getline() returns an array of pointers to
character strings.
Note: that lex.yy.c is generated from the code lex.c.
To compile lex.c, you have to use flex: "flex lex.c", which will generate lex.yy.c
(you can use lex.yy.c directly, or generate it from compiling the lex.c file).
3) You can use the following command line to build an executable called myshell.
4) Either use step-3 or this Makefile.
Functions used in Project4--very helpful (apply and use code in this file to understand the concepts further).
Programming Assignment5-- due: Friday April 20, by 11:59pm.
PalmOS Application--Random Number Generator & Tapping Sequence Order
Finished product-Executable with Random Generator (use this code for the project--hello2Full.zip)
The code, demo, and illustration is in appendix-A1-Example-1 (PDA programming in C-book)
Standard C Strings and Characters, C library functions reference
Assignment programming string tools (ppt) [may be used to get the contents of the text field including FldSetNewText() ]:
FieldType *fieldseq;
int seqOrderLen = FldGetTextLength(fieldseq) --> get the contents length of the text field.
char *seqorderStr = FldGetTextPtr( fieldseq) --> get the contents of the text field. or
char seqorderStr[MAX] = FldGetTextPtr( fieldseq);
Assignment Design Flow-Chart
Project5
Grading
Sheet