CSCI  1320 Tentative Schedule - Spring 2001
 Class 
Topic(s)
 Reading Assignments 
& Handouts
 Laboratory 
Assignments 
1/9
 

[1]

 Introduction To Class
Distribute & Discuss Course Outline
Log Out Of UNIX - To NT
Log Out of NT To UNIX
Operating System
Telnet
janus01.cs.trinity.edu - 
ls, ls -l, ls -a, ls -al
yppasswd
cp
mv
rm
clear
ls P*, ls *.jpg
vi
cat
man 
ASCII
bit, byte
 Course Outline

Fill Out Questionnaire (Lab I-5 points)

Introduction To UNIX

Introduction To VI

Telnet Requires That You Set Up A UNIX Account
Same UserName - Different Password!
---------------------------------
Get Help Setting Up Mail Account 
(if not yet done)
Go To A University Lab - Log In
Select  Network Neighborhood
Select To Entire Network
Select  Microsoft Windows Network
Select CS
Select Sol
Check Mail - Password Will Be Mailed To You!
Have One of the CS Majors Help If Needed

If  Mailed Password Does Not Work
Go See Dr. Howland Halsell 201C (999-7364)

Telnet From Off Campus is Disabled!

 Questionnaire 

 UNIX Lab

1/11

[2]

 cd
mkdir
rmdircat
man 
cd
mkdir
rmdir
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

Operating System
Compiler
Source File
Object File
Machine Language
Assembly Language
Low Level Language
High Level Language

 Review & Practice UNIX commands
Practice Telnet
Review & Practice vi commands

Read Chapter 1

 VI Lab

Chapter 1

1/16
 

[3]

Mother Board
ALU 
Hard Drive
Monitor 
Byte
Power Supply
RAM
Keyboard 
ASCII
KB
Tape Driv
IC Chip 
CPU
Bus
Bit
ROM 
Microprocessor
Floppy Drive
CD Rom Drive
Mouse 
MB
SIMM / DIMM
GB
Sector 
Input Device
Block
Output Device
Track 
Modem
Format Disk
Hardware 

B - Thompson
C - Ritchie
C++ - Stroustrup

Information Representation
ASCII
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!
Convert Base 10 to Base 2
Convert Base 2 to Base 10

 Hardware Tutorial

Read Chapter 2.1-2.3

 Hardware Lab
1/18
 

[4]

5 Steps - Software Life Cycle
Analysis
Design Algorithm
Implement-Code
Test
Maintainance

Review Conversion 
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

 
 Numeration Systems Lab
1/23
 

[5]

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

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

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

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

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

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

Read Chapter 2.4 - 2.5 
 Decision Lab
1/25
 

[6]

 5 Steps - Software Life Cycle
Analysis
Design Algorithm
Implement-Code
Test
Maintainance

Operators *, /, +, -, %
Modulus
representing mathematical
expressions

Escape Sequences \n, \a

display stream decimals
cout.setf(ios::fixed)
cout.setf(ios::showpoint)
cout.precision(2)

Compound Decisions
if ( (A == 5) && (B==6))
if ( (A < 5) || (B > 6))
if ( (A < 5) || (B ! = 6))

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

PostTest  Loop

do 
         ---------- 
while ( condition)

do 
   {
         ----------
         ----------
    } 
while ( condition)

PreTest  Loop

while ( condition)
       ----------

while ( condition)
   { 
         ----------
         ----------
    } 

Fixed Repetition Loop

for ( init ---- ; condition ; loop ----)
       ----------

for ( init ---- ; condition ; loop ----)
   { 
         ----------
         ----------
    } 

 Read Chapter 3.1-3.3
Loop Lab
1/30
 

[7]

 Counter++
Count +=2  Counter = Counter + 2
Count -=2  Counter = Counter - 2
Count *=2  Counter = Counter *2
Count /=2  Counter = Counter / 2
Count %=2  Counter = Counter % 2

double sqrt(9.0)
double pow(2.0, 3.0)
int abs(-4)
long int labs(-40000)
double fabs(-2.3)
double ceil(3.2)
double floor (3.2)
math.h

Software Life Cycle
Quadratic Roots Application
Clear Screen

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

Delvelop
Quadratic Roots Application

Redirect Output
a.out > Output.txt

Print From Windows
Save to Disk In Windows
PostTest Loop
Decisions

 
PayRoll 1 Lab
2/1
 Introduction To Procedures/Functions
Without Explicit Return
Passing By Value
Passing By Reference

Modularize  Quadratic Program
void ClearScreen(void);
void Commercial(void);
void GetData (double & A, double & B, 
double & C);
void Calculate (double A, double B, double C, 
double & Root1, double & Root2);
void Delay (void);
void Display (double A, double B, double C,
double Root1, double Root2);

 
 PayRoll 2 Lab
2/6
 
 
 Pizza Lab
2/8
 Review Design,
Hierarchy Chart, 
Modules, 
Prototypes,
Calling Functions

Random Number Generation
long int rand()
Guess My Number Game

 
 
2/13
 Functions With Explicit Returns
 
 Explicit Function Lab
Due Mon By Noon
2/15
 Introduction To Classes
Constructor
Overload Constructor
Private Data
Public Data
Display
Methods
Objects
Declarations
 
 
2/20
 Destructor
Set Method
Get Method
Overload Constructor

More On 
Classes

 
 Book Class Lab
2/22
 Overload Constructor
Default Arguments
Overload Display Method
Default Arguments
Multiple Signatures
 
Computer Class Lab
2/27
 Review For Exam
 
 
3/1
 Exam I
 
 
3/6
 Go Over Exam

# define MAX_NOS 5
# define MAX_BOWLING 30
# define MAX_EXAMS 20

void DisplayIntArray(int Array[], int ActNo, int Max, char Message[]="");
void FillIntArrayRandom(int Array[], int & ActNo, int Max,
                        int NoToFill, int Low, int High);

main (int argc, char * argr[])
{
int 
Nos [MAX_NOS + 1],
 ActNoNos = 0, 
 Exams [MAX_EXAMS + 1],
 ActNoExams = 0, 
 Bowling [MAX_BOWLING + 1],
 ActNoBowling = 0;

 
 
3/8
 Int Array Structure
Low, High, Avr Functions
int SumIntArray (int Array[], int ActNo);
long double AverageIntArray (int Array[], int ActNo);
int LowIntArray (int Array[], int ActNo);
int HighIntArray (int Array[], int ActNo);
void InitializeIntArray (int Array[], int & ActNo, int Max);
void FillFromKeyboard(char Prompt[], int Array[], int & ActNo, int Max, 
                      int KickOut = -99999999);
 
 Static Int Array Lab
Due 3/22
3/13
 Spring Break
 
 
3/15
 Spring Break
 
 
3/20
 Dynamic Arrays
 
 
3/22
 Dynamic Array Class
 
  Dynamic Array Class Lab I
Due 3/30
3/27
 Binary Sort
 
 
3/29
 Sequential Searching
Binary Searching
 
 Dynamic Array Class Lab II
Due 4/17
4/3
 Templates
 
 
4/5
 Template Array Class
 
 
4/10
 Work On Dynamic Array Class Lab 
During Class!
 
 
4/12
 
 
 
4/17
 
 
 
4/19
 
 
 
4/24
 Exam II
   
4/26
     
5/2 & 5/3
Reading Days
 
 
There Will Be A Final Project!  There Will Not Be A Comprehensive Final Exam During Exam Week!