Principles Of Algorithm Design 1
CSCI 2320 -  Fall 2009 - Tentative Schedule - 2:10 TT

All Labs/Assignments Are Due The Next Class Period Unless Specified Otherwise!

 Class 

Topic's)

 Reading Assignments 
& Handouts

 Laboratory 
Assignments 

 

# 1

8/27

R

 
Introduction To Class
Fill Out Questionnaire (4 points)
Discuss Course Outline

Application Software
Assembly Language
Assembly Language
Central Processing Unit
Compilation
Compiler
Computer Language
Computer System
Distributed Environment
Executable Program
Flowchart
General Purpose Software
Hardcopy
Hardware
High Level Language
Input Device
Operating System
Linker
Output Device
Processor
Primary Storage
Secondary Storage
Pseudocode
Soft Copy Software 
Source File
Software/System Development Life Cycle
Text Editor
Machine Language
Main Memory
Software Engineering
Waterfall Model
Liniux
GUI

 

Read Chapter 1

Scan Chapter 2

Intro To Linux

VI Editor

Questionnaire HW

Chapter-1.HW

VI HW

Linux HW

 

# 2

9/1

T

 


Using Putty

Structure Of Program
Preprocessor Directives
Global Directives           
int main(void)                    
{                                      
Local Declarations
Statements
{                                       
Line Comment //
Block Comment /* .... */

Identifiers
int
char
float

Declaring Variables
printf
puts

scanf
gets

   

Dorm-Configuration

Read Chapter 2

Integers

Floats

Compute Product Lab

Chapter 2
Answer the Review Questions.
Answer Exercises 1-29

 

# 3

9/3R

 


preprocessor directives
#include <stdio.h>
#include <string.h>
#include <math.h>


format specifications for
printf

format specifications for
scanf
 

Characters Compute-Quadratic Lab

 

# 4

9/8

T

 


Primitive Data Types
(int) min standard & range
(int) our system & range
(short int) min standard & range
(short int) our system & range
(long int) min standard & range
(long int) our system & range

ASCII
How To Represent characters
'A' = ASCII 65 = 01000001

float
char
char string

fputs
fgets
fprintf

Valid Integers
Valid Identifiers

Binary Representation
Euler Formula
Convert Base 2 to Base 10
Convert Base 10 to Base 2

Choosing the appropriate
Data Type

Constants vs. Variables
 

Numeration Systems

CharacterStrings

Chapter-2 Homework
Due 9/15

 

# 5

9/10

R

 


Review
Primitive Data Types
(int) min standard & range
(int) our system & range
(short int) min standard & range
(short int) our system & range
(long int) min standard & range
(long int) our system & range
ASCII
How To Represent characters
'A' = ASCII 65 = 01000001

fgets
fprintf

Binary Representation
Binary Representations

Euler Formula
Convert Base 2 to Base 10
Convert Base 10 to Base 2

Euler Formula
Convert Base 8 to Base 10
Convert Base 10 to Base8

Convert Base 8 to Base 2
Convert Base 2 to Base 8

Copy files from /users/thickst/1320 to
your linux directories

Mathematical Order Of Operations
Add - Sub
Mult - Div
Exponentiation

sizeof(int)
sizeof(float)
sizeof(long int)
sizeof(short int)
sizeof(char)sizeof(double)
sizeof(bool)

Spreadsheets Do Order Of Operations
Wrong

Displaying the Hexadecimal Address
Of Where Variables Are Stored
In Memory
 

Numeration Systems

Order-Operations

Read
Chapter 3

Do Chapter 2 (above)
For Tuesday Quiz

I have posted some notes
and examples (Red)
as they relate to the last few lectures.
Review Them!


Chapter-2.5-HW

 

# 6

9/15

T

 


Continuation Of Strings
strcpy
strlen
strcmp
gets - string
scanf - strings

Introduction To Sturctures
struct

  Practice with strlen,
strcpy, and strcmp on the
computer. 

 

# 7

9/17

R

 

Void Functions - No Explicit Returns

Review Functions
Passing By Reference
Passing By Value
Memory Maps
    

 

# 8

9/22

T

 

Discuss Exam
Review Functions
Passing By Reference
Passing By Value
Memory Maps

if then else
Decisions

  Review For Test

Global-Local-Variables

Explicit-Return-Functions

Void-Functions-Program-Execution

Study For Exam 1
Extra Credit If You Do Study Group
For 3 Hours Or More
 

 

# 9

9/24

R

 

Exam I Read
Chapter 4
PayRoll-Calculation Lab

Chapter-4 HW.pdf

 

# 10

9/29

T

 

if then else
Decisions

AND &&
OR ||
NOT !

DO WHILE LOOP
FOR LOOP

   

 

# 11

10/1

R

 

Character String Functions
Review Loops
Read The First Half
Of The Chapter On Arrays
Utility-Functions-1 Lab
Due 10/8/09

 

# 12

10/6

T

 

 

Discuss Generic Utilities and
The Value Of GetString

bool GetString(char Prompt[], char String[], long int MaxChar, bool Clear);

Complex Logic Design
Using Flowcharting Techniques

Create A Good GetInt Function

bool GetInt (char Prompt[], int * Int, int Low, int High, bool Clear);
 

Read The First Half
Of The Chapter On Arrays
 
 

 

# 13

10/8

R

 


Discuss Generic Utilities and
The Value Of GetString

bool GetString(char Prompt[], char String[], long int MaxChar, bool Clear);

Complex Logic Design
Using Flowcharting Techniques

Create A Good GetInt Function

bool GetInt (char Prompt[], int * Int, int Low, int High, bool Clear);
 

Finish Reading
Array Chapter From Book
Utility-Functions-2 Lab

 

# 14

10/13

T

 

Introduction to
Arrays
Max Array
ActNo
Declaratons
Adding Data To Arrays

RandNo
Display Function

  Work On SumIntegerArray
Work On HighIntegerArray

 

# 15

10/15

R

 

Algorithms
Search For High Value
Search For Low Value
Add Item
Sum Elements
Avr Elements

Loop To GetInt Elements
Fill With Sequence
 

  Int-Arrays-1 Lab

 

# 16

10/20

T

 


Why Files?
Redirecting Output To A Text File
fopen & fclose- Open To Create New File Close File (w/r)
fprintf – Writing Data
fscanf – Reading Data

FILE  *FilePtr;
FilePtr = fopen (NewFileName,"r");
FilePtr = fopen (NewFileName,"w");

Optional
Chap08
TextFiles

Optional
Chap11

Int-Arrays-2 Lab

 

# 17

10/22

R

 


Sequential Search Arrays
Order N

Sorting Arrays
Order N2
Bubble Sort
 

Binary Search Arrays
Order N Log N

 

  Int-Arrays-3 Lab

Practice Reading & Writing to Files

 

# 18

10/27

T

 


Introduction To
Structures
struct LibBook
{
	char
		Title[80],
		Author[40];
	int
		Genre,
		NoPages;
	float
		Cost;

};
void DisplayLibBook(struct LibBook Book);
void InitializeLibBook(struct LibBook * Book);
void GetBook(struct LibBook * Book);
  Study For
Exam

 

# 19

10/29

R

 

Exam II Read The Chapter
On Structures In Your Book
Struct-Part Lab

 

# 20

11/3

T

 

Introduction To
Dynamic Memory
Read
Infix-Prefix-Postfix
Practice With
Dynamic Memory

 

# 21

11/5

R

 


Review malloc & free

Dynamic vs. Static Memory
DisplaycStack
InitializecStack

Primitives
Push, Pop, Empty

struct cStack
{
	long int
		Max,
		Top;
	char
		*Items;

};
void InitializecStack (struct cStack * Stack, long int NewMax);
void DisplaycStack (struct cStack * Stack, char Message[], 
                    int NoToDisplay);
bool PushcStack (struct cStack * Stack, char NewInfo);
bool PopcStack (struct cStack * Stack, char * OldInfo);
bool EmptycStack (struct cStack * Stack);
bool FullcStack (struct cStack * Stack);
void DestroycStack(struct cStack * Stack);
Read
Infix-Prefix-Postfix Slides
Validate-Infix
Final Project Part I

 

# 22

11/10

T

 


Prefix, Postfix, Infix
Expressions

Introduction To Direct Access
Files

FILE  *FilePtr;
FilePtr = fopen (NewFileName,"rb+");
FilePtr = fopen (NewFileName,"wb+");
fseek(FilePtr, 4 * sizeof(Student), SEEK_SET);
fwrite(&Students,sizeof(Student),(long)1,FilePtr);
fread(&Students,sizeof(Student),(long)1,FilePtr);

 

struct Student
{
	char
		Name [30];
	long 
		ID;
	char 
		Phone[15];
};
void SetStudent(struct Student * Stud, char NewName[],
                long NewID, char NewPhone[]);
void DisplayStudent(struct Student * Stud);
Read
Direct Access File Slides

Read
Infix-Prefix-Postfix Slides

Evaluate-Postfix
Final Projet Part II

Due 11/17

 

# 23

11/12

R

 


Evaluate Postfix Algorithm
Revisited

Continue Direct Access
Files

FILE  *FilePtr;
FilePtr = fopen (NewFileName,"rb+");
FilePtr = fopen (NewFileName,"wb+");
fseek(FilePtr, 4 * sizeof(Student), SEEK_SET);
fwrite(&Students,sizeof(Student),(long)1,FilePtr);
fread(&Students,sizeof(Student),(long)1,FilePtr);

File Seek
SEEK_SET, SEEK_END

Generalizing ReadRecord For Easier Direct Access
void ReadStudentRecord (long RecNo, 
                struct Student * Stud, FILE fp);
Read
Direct Access File Slides


Read
Infix-Prefix-Postfix Slides
 
Evaluate-Postfix
Final Projet Part II

Due 11/17

 

# 24

11/17

T

 

 

Form A Postfix Expression
Algorithm Revisited

Direct Access Files

File Seek
   SEEK_SET, SEEK_END

Generic Utilities

void ReadStudentRecord (long RecNo,
                struct Student * Stud, FILE fp);

void ReadStudentRecord (long RecNo,
                struct Student * Stud, FILE fp);

void FileLength (FILE fp, long int NoBytesPerRecord);

 

Read
Direct Access File Slides


Read
Infix-Prefix-Postfix Slides
Create-Postfix
Final Project Part III
Extra Credit If Turned In By 11/25
Due 12/1

 

# 25

11/19

R

 

Introduction To Recursion   Small Recursive Program

 

# 24

11/24

T

 

Thanksgiving
Week

Individual Assignment
Work On Final Project

   

 

# 25

11/26

R

 

Thanksgiving
Week
   

 

# 26

12/1

T

 

Two Dimensional Arrays
Queues
   

 

# 27

12/3

R

 

Exam III    

 

# 28

12/8

T

 

     

12/9
12/10

Reading Days Reading Days

 

 

 


 

No assignments will be accepted after 12/11 Noon