[MWF] Principles Of Algorithm Design I  - CSCI  1320 Tentative Schedule - Fall 2001 [MWF] 

 Class 
Topic(s)
 Reading Assignments 
& Handouts
 Laboratory 
Assignments 
8/31
Introduction To Class

Distribute Course Outline
Distrubute Questionnaire



ClassRoom System
Log Out Of  UNIX - To Win 2000
Create UNIX Accounts
Check E-Mail & Record Password


Log Out of  Win 2000 - To UNIX
Log Into UNIX With 
UserName & Password
Log Out UNIX


All But One User
Restart Win 2000

Add Printer For HAS-LabPrinterA
Go To Hicks Class Web Page
http://www.cs.trinity.edu/~thicks/1320
Go To  Schedule Page

Instruct To Print A Copy
UNIX & VI Tutorials For Next Class



Telnet Into One User's UNIX System
Read Course Outline

Fill Out Questionnaire (Lab I-5 points)

Print - Introduction To UNIX - 
Bring To Next Lecture

Print - Introduction To VI - 
Bring To Next Lecture

Read Chapter 1 Of Text



Note For Those Missing Class
Telnet Requires That You Set Up A UNIX Account
[This New Account Will Have The Same UserName, but a Different Password!]

This New UNIX Account Must Be Created From A University Lab On Upper Campus!
Go To A University Lab - Log Into Windows
Double Click On My Network Places Desktop Icon
Double Click On "Entire Network Choice"
Double Click On " Microsoft Windows Network"
Double Click On CS Icon
Double Click On Sol Icon

Start Internet Explorer & Check Your Mail
http:\\exchange.trinity.edu
New Password Will Be Mailed To You!

Have One of the CS Majors Help If Needed
If  Mailed Password Does Not Work
Contact Dr. Howland Halsell 201C (999-7364)

Telnet From Off Campus is Disabled!

Complete - 
Questionnaire 
Bring To Next Lecture

 

9/5
 Discuss Course Outline & Requirements
ls, ls -l, ls -a, ls -al
clear
ls P*, ls *.jpg
cat
yppasswd
cp
mv
rm
rmdir
vi
man 
cd
mkdir
rmdir
man 
vi commands
Review & Practice UNIX commands
Practice Telnet
Review & Practice vi commands
 UNIX Lab
9/7
 vi commands
command mode
A, i
:5
Arrow Keys
x, 3x
dd, 3dd
2yy, P, p
arrow keys
ESC:wq
ESC:w
ESC:q!
/cout, /main, /{
:r FileName
G
Insert Mode
Keys, ESC

Binary 0,1
Program
Source Code
Compiler 
Linker
Input / Output
Prompt

Binary File / Binary Code
Machine Language
Executable File

About OOP
Object Oriented Programming
B - Thompson
C - Ritchie
C++ - Stroustrup

Abstraction
Object
Attributes
Behaviors

5 Software Life Cycle
Analyze, Algorithm
Code, Test, Maintain

I. Object-Oriented Analysis (OOA)
Should Include Specifications
II.  Object-Oriented Design (OOD)
Design An Algorithm
III. Implement & Code 
IV. Test
V. Maintain

 
VI Lab

Text Program Lab

 

9/10
Computer Hardware I

Power Supply
Bus
Mother Board
IC Chip
Microprocessor
CPU - ALU 
SIMM / DIMM
Bit - Byte - KB - MB - GB
RAM - ROM
Keyboard 
ASCII



Information Representation
char  (1 byte)
Binary Numeration System 
Base 2 (0,1)
Counting in Binary
short int (1+ byte)
int - (2+ bytes)
long int (4+ bytes)
Octal Numeration System
Base 8 (0,1,2,3,4,5,6,7)
Hexadecimal Numeration System
Base 16 (0,1,2,3,4,5,6,7,9,A,B,C,D,E,F)


Numerical Information Representation
Memory - short int
Sign Magnitude 
One's Complement
Two's Complement
Char - ASCII


No Calculators On Exams/Quiz!
Convert Base 10 to Base 2
Convert Base 2 to Base 10
 Hardware Tutorial 

 

 Numeration Systems Lab
Due 1 Week

 

9/12
Computer Hardware II

Input Device
Output Device
Monitor
Mouse
Keyboard



Floppy Drive
Format
Surface
Cyllinder
Track
Block


Floppy Drive
Hard Drive
Tape Drive
CD-R Drive - CD ROM
CD-RW Drive


Review Conversion 

No Calculators On Exams/Quiz!
Convert Base 10 to Base 2 
Convert Base 2 to Base 10 
Convert Base 10 to Base 8 
Convert Base 8 to Base 10 
Convert Base 16 to Base 8 
Convert Base 16 to Base 2 
 Convert Base 2 to Base 16 
 Convert Base 8 to Base 16 
  Convert Base 10 to Base 16

 Read Chapter 2.1-2.3
 
9/14
Computer Hardware III

Drivers
Video Card
NIC - Network Card
Sound Card
Modem
A-To_D Card



Datatypes & Range & Size
float 7 digits
double 15 digits
long double 19 digits

char, string
int, short int, long int

5 Software Life Cycle
Analyze, Algorithm
Code, Test, Maintain

Review Conversions

 Read Chapter 2
Hardware Lab

Numeration Systems Lab

9/17
 Comments // /*..  */
# include Directive
void main(int argc, char * argv[])
Braces { }
Variables

Minimal Range
short int x [127 <==> -128]
short int (1+ Bytes)
int x [32,767 <==> -32, 768]
 int (2+ Bytes)
long int x [2,147,483,647 <=
=> -2,147,483,648]
int (4+ Bytes)

unsigned int x [0 <==> 65,535]
unsigned short int x [0 <==> 255]
unsigned long int x [0 <=
=> 4,294,967,296]

char (1 Byte)
char x : ASCII 0-255
char x[3] (3 Bytes)
char x[25] (25  Bytes) 

float x [7 digits accuracy]
float (4+ Bytes)
double x [15 digits accuracy]
float (8+ Bytes)
long double x [19digits accuracy]
float (12+ Bytes)
Not Always Avail On All Compilers

Statements End ;
Declaration 
int x;
Assignment Statemtents =
Expression Statement
x = 15;
Declaration-Initialization
int x = 15;

Identifiers = Variable Names
Variable Naming - Cap First Letter
A-Z, a-z, _

Constants
const int x = 32000;

Output <iostream.h>
cout  << "Character Strings"
cout  << Variables/Constants
cout  << endl

Input <iostream.h>
cin >> x;
>> Input/Extraction Operator

int Division
float Division

Modulus %
12 % 7 = 5
12 % 3 = 0
12 % 5 = 2

x++ => x + 1
x-- => x - 1
x += 2 => x = x + 2
x -= 2 => x = x - 2
x *= 2 => x = x * 2
x /= 2 => x = x / 2
x %= 2 => x = x % 2

char Option = 'N';

Save A File To IBM Floppy
Print A File On IBM Network
Left Margin = 1.25 "

Clear Console Screen
# include <stdlib.h>
   system ("clear");

 
Payroll #0 Lab
9/19
 real division vs integer division
12/5
12./5, 12/5., 12./5.
float(12)/5, 12/float(5)
float(12)/float(5)
(float) 12) /5, 12/ (float) 5
(float) 12 / (float) 5

cout << int(3.3)
cout  << float (2)

Clear Console Screen
# include <stdlib.h>
   system ("clear");

if ( condition)
      ----------

if ( condition)
      ----------
else 
      ----------
 

if ( condition)
   { 
         ----------
         ----------
    } 
else 
   { 
         ----------
         ----------
    } 

 Read 4.1 & 4.2
Decision Lab
9/21
 Polymorphism : Ability Of C++ To
Perform The Same Operation On
Different Types Of Data

Display Stream Decimals
# include <iomanip.h>
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);

Format Text
# include <iomanip.h>
cout << setw(10) << No;

7 Programming Style 
Guidelines P. 69

Syntax Errors
Logic Errors
RunTime Errors

Decisions
if then
if then else
operators 
>, <, >=, <=, ==, !=

if ( condition)
   { 
         ----------
         ----------
    } 
else if ( condition)
  { 
         ----------
         ----------
    } 
else 
   { 
         ----------
         ----------

    } 
 
 
9/24
 Pass By Reference
Pass By Value
Pizza Problem
 
 
9/26
 Pass By Reference
Pass By Value
Pizza Problem
Oterher Examples
 
 PayRoll 2 Lab
Due Friday By 12:30
9/28
 Pass By Reference
Pass By Value
Pizza Problem
 
 
10/1
Explicit Functions
 
 
10/3
 Exam I
 
 
10/5
 Explicit Functions
Fixed Repetition Loop 
for (Initialization; Decision; Process At End)
bool Valid;
Valid = true;
Valid = false;
if (true) 
.........
 Read 5.1-5.5 
Explicit Function Lab
10/8
Suprise Quiz On Explicit Functions 

Review PostTest Loop
do { ....... ) while (condition);
Review Fixed Repetition Loop
for (init; condition; Process At End) {......};
Introduce Pretest Loop
while (condition) {......};

Guess My Number Game
Modularized
Random Numbers
rand() -- stdlib.h
Random Number Generator
srand(??)

 
 
10/10
 Random Numbers
rand() -- stdlib.h
Random Number Generator
srand(??)

Guess My Number Game
Introduction To Arrays

 10 Minute Scan Of 
Chapter On Arrays
 Loops Lab
10/12
 Introduction To Arrays
Revisit GetInt
 
Due Monday
Intro Array Lab

Will Accept Mon/ Wed
Get Integer Lab

10/15
 Review
 
 
10/17
 Array Processing
ActNo, Max, Array
Display
FillRandom
 
 
10/19
 Array Processing
ActNo, Max, Array
Initialize
Fill From Keyboard
Avr & Sum Functions
 
  Due Next Wed

 Static Array Lab 1

10/22
 char Name[25];
string.h
strlen(String)
strcpy(OriginalString, NewString)
strcmp(OriginalString, NewString)
strcmp(FirstString, SecondString)

Introduction To Classes
class
{
private:

public:
};
Method
Constructor Methods
Destructor Methods
Set
Display
Get

Function Overloading
Multiple Constructors

 
 Book Class Lab
10/24
 Overload Constructor
More Than 1 Signature Accepted
Officer(void)
Officer(char Name[], long int ID);
Officer Of1, Of2("Jennifer",11223);
1 Signature From Constructor 1
--
1 Signature From Constructor 2
S L

Default Arguments
Officer (char Name[]="", long int ID=0);
Officer ( long int ID,char Name[]="");
Defaults in prototype only
Officer Of1, Of2("David"), 
Of3("Sean", 22334), Of4(33445),
Of5(44556,"Mark")
3 Signatures From Constructor 1
S L,  S,    --
2 Signatures From Constructor 2
 L S,   L

 
 
10/26
 Fall Break
 
 
10/29
 Dynamic Memory 
Management
 
 Computer Class Lab
10/31
 Int Array Class
Constructor
Dynamic Memory
new delete
 
 Work On 
IntArray Project 
Constructor
Destructor
11/2
 Exam II
 
 
11/5
 Dynamic Memory 
Pointers
Review Exam
IntArrayClass Transformation
 
 Work On 
IntArray Project 
11/7
 Dynamic Memory Management
Sequential Text Files
Open, Close, Read, Write, End Of File
 
 Work On 
IntArray Project 
11/9
 Sequential Text Files
Open, Close, Read, Write, End Of File
 
 Work On 
IntArray Project 
11/12
 Sequential Search
Order N

Binary Search
Order Log N

 
Due By 4:30 Wednesday
Dynamic Array Lab 2
11/14
 Break Program Into 
.hpp and .cpp files
 
 
11/16
 Recursion
 
 
11/19
 Recursion
 
 Dynamic Array Lab 3
11/21
 No Formal Lecture
 
 Add Iterative BinarySearchI, 
SequentialSearch To Dynamic Array 2 Lab
11/22 & 11/23
 Thanksgiving Break - No Classes
 
 
11/26
 Break Program Into
.hpp and .cpp files
Makefile
make
 
 Add Iterative BinarySearchI, 
Recursive BinarySearchR, 
SequentialSearch To Dynamic Array 2 Lab

Recursive String Lab
Due Wed

Inclass Lab
 Dell Makefile Lab

11/28
 Templates 
Swap Template Method
Array Template Class
 
 Finish Up Dynamic 
Array Lab 3
12/3
 Review For Exam
 
 Finish Up Dynamic 
Array Lab 3
Study For Exam
12/5
 Review For Exam 
 
 Study For Exam
12/7
Exam III
   
12/10
 Inclass Operator Overload Lab
Nothing To Turn In - Approved In Lecture
 
12/12 & 12/13
Reading Days
 
 
There Will Be A Final Project!  There Will Not Be A Comprehensive Final Exam During Exam Week!