Data Abstractions
Dr. Tom Hicks - Trinity University - CSCI 2320-  Fall 2020

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


P
R
E
-
S
E
M
E
S
T
E
R




Maybe Prepare Your Computer
Before Semester Begins?

 

For Those Who Do Not Have A Windows Computer

Install-VirtualBox-On-MacOS

Install-Configure-Windows-10-Enterprise

Having VS 2019 Will Help
All Should Try To Create C++ Project
(In Tutorial Below)

Install-Configure-Visual-Studio-2019

All Should Review C

   

How o Upload Files To Mars DropBox
(VMWare Installation Directions Included)

Transferring-Files-Into-My-Mars-DropBox-From-Win.pdf

Transferring-Files-Into-My-Mars-DropBox-From-Mac.pdf

Transferring-Files-Into-My-Mars-DropBox-From-Linux.pdf
# Topic(s) Reading Assignments
 & Handouts
Laboratory Assignment

#1

8/25

TU


Introduce Course Briefly

Review Dynamic Memory
Create Dynamic Memory Ptrs
Initialize Ptrs To NULL
Acceptable Range Of Pointer Values
Validate Memory Allocation
malloc & free
new & delete
Allocate A Dynamic Array
Free A Dynamic Array
Allocate A Ptr To A Struct
Access Struct Variables
(*Ptr).field =
Ptr->field =
 

 

Course Outline

Pointers-Dynamic-Memory-Slides

Watch
https://www.youtube.com/watch?v=SezbHFe-jy4

Read pp 1-23 Introduction To Algorithms

Questionnaire
Insertion-Sort-HW

Insertion-Sort.zip


# 2

8/27

TH


Introduce Classes
Function Overloading
End Of String Marker '/0'
Aggregates : arrays, structs, classes
Student Struct - Set Function
Intro To Classes
Student Class - Set Method
Member Functions = Methods
Class Data Members
Class Function Prototypes
Encapsulation
Constructors,
Destructors
public vs. private
scope operator
Function Overload
Function Signature
Default Arguments
Memory Leaks
Mutator Method
Accessor Method
ADT - Abstract Data Type
Operator Overloads
>, >=, <, <=, ==, !=, =
Testing
Function Signatures
Scope
ADT - Abstract Data Type

 

Introduction-To-Interfaces-Classes-1.pdf

Student-Class-1-Merge-Sort-HW

Student-Class-1- Merge-Sort.zip

Project.zip

# 3

9/1

TU

Interface Files Student-Copy-Paste.zip
 

# 4

9/3

TH

  

Finish TomH-Sudent-2

Templates
Create Swap Function
template <class T>
template <class InfoType>
C++ Also Supports Generics
Templates - Pattern For What Shall Become A Function
Templated Function Generated At Run Time
Templates With Multiple Parameters
Templated ListType
Constructor & Destructor

Start Stack

 

 


TomH-Student-2.zip


Template-Stack-Insights.pdf


Download
Stack-Starter.zip

TomH-Part.zip


# 5

9/8

TU

 

Stacks
ADT - Abstract Data Type
LIFO - Last In First Out
FIFO - First In First Out
Stack & Queue
Push, Pop, Empty
StackTop, Resize, Full
Copy Constructor, operator = Overload
Stack Design I - Static Array
Stack Design II - Dynamic Array
Stack Design III - Templates
Help With Resize
 
 

Recordings/2320-9-8-20.zip

   

Template-Stack-Insights.pdf

DA-Files.pdf

 

Stack-Queue.zip

# 6

9/10

TH

 

Direct Access Files
open, close
frets, puts
printf, scanf
format specifications for into, unsigned into, hex,
floating point, double, char, & string
Why We Need Direct Access Files
Direct Access vs. Text Files
dir & ls
open modes web+ & rib+
buffered file system

seek (Filet, No Bytes, SEEK SET)
fseek(StudentFil, 4 * sizeof(Student), SEEK_SET);

fwrite(&Info, InfoSize(byes), # records, fp);
fwrite(&NewStudent, sizeof(Student),(long)1,StudentFil);

fread(&Info, InfoSize(byes), # records, fp);
fread(&NewStudent,sizeof(Student),(long)1,StudentFil);

Develop Generic FileLength
Develop Generic ReadRecord
Develop Generic WriteRecord

Recordings/2320-9-10-20.zip

  

DA-Files.pdf

 

Files-Class-Practice-1.cpp

Stacks-Queues-Files2-HW.zip


# 7

9/15

TU

 
DLNode Class

ListHeader Class
ListHeader Inherited
PartListHeader, StudentListHeader,
AutoListHeader, IntegerListHeader, etc.

DLList Class
Constructor, Destructor
CreateHeaderNodes,
CreateNodes
GetNode

Recordings/2320-9-15-20.zip
 
  
DA-DLList-1-Slides.pdf

DLList-1.zip

# 8

9/17

TH

     DLList Class
Constructor, Destructor
CreateHeaderNodes,
CreateNodes
GetNode

Recordings/2320-9-17-20.zip

DA-DLList-1-Slides.pdf

Hashing-1.pdf


Hash-1-DLList-1.zip

# 9

9/22

TU

DLList
DA-DLList

Recordings/2320-9-22-20.zip

Push-Double-Linked-Lists.pdf NEW-TomH-DA-DList-Student.zip


# 10

9/24

TH

DLList
DA-DLList

Recordings/2320-9-24-20..zip  


DLList Key.zip
TomH-DLList-2-HW.zip

# 11

9/29

TU

 Neither Binary Tree Nor DA_DLList Will Be On Exam 1

DA-DLList

Recordings/2320-9-29-20.zip


BinTreeX-Student.zip



Study For Your Exam


# 12

10/1

TH



Exam I 


 

# 13

10/6

TU

   

BinTree Internal Memory Solution

 Constructor
Destructor
CreateNodes
CreateHeaders
GetNode
FreeNode
ValidHeader
ValidNode

SetLeft
SetRight
Inplace

 



 

 

DA-DCList.zip
# 14

10/8

TH

Hashing 2
Binary Tree Review
DA-BinTrree

Recordings/2320-10-8-20.zip



Hashing-2.pdf

BinaryTree-Review-Slides.pdf





HW

DA-Bin-Tree-Hash-2.zip

# 15

10/13

TU

Tree Traversals
Recursive
Stack
Threading

Recordings/2320-10-13-20.zip

Project-BinaryTree-Slides.pdf DA-BinTree-2-HW.zip

# 16

10/15

TH

General Trees
Key Tables
B Trees & B+ Trees

Recordings/2320-10-15-20.zip

   
General-Tree-Key-Table-B-Tree.pdf

 


DA_BinTree-3-Stats-BTree.zip

# 17

10/20

TU

 
Introduction To MySQL
SQL Acronym
DBMSAcronym
Log Into MySQL

SHOW DATABASES
CREATE DATABASE
DROP DATABASE
USE
CREATE TABLE
DROP TABLE
DESCRIBE
SHOW FIELDS IN
SELECT * vs
SELECT x,y,z

Recordings/2320-10-20-20.zip

 

Install-Configure-MySQL-Windows

   Desktop.zip
Start Coding Rebalance Tree
1 Week


# 18

10/22

TH

More Database
MySQL Workbench

Recordings/2320-10-23-20.zip


MySQL-1.pdf

   

DA_BinTree-4-Rebalance-Trree-Database-HW.zip

# 19

10/27

TU

 
AVL Trees

Two Russians named Adelson-Velskii and Landis.

An empty tree is height balanced.

For a tree T, T-L shall denote the left subtree and T-R shall denote the right subtree.

For a tree T, h-L shall denote the height of the left subtree (T-L) and
h-R shall denote the height of the right subtree (T-R).

A non empty binary tree is HEIGHT BALANCED if and only if
T-R and T-L are height balanced
-1 <= (h-L) - (h-R)| <= +1

The BALANCE FACTOR of a node T in a binary tree bf(T) = h-L - h-R.

 For any node T in an AVL tree, bf(T) = -1, 0, or +1


Recordings/3220-10-27-20.zip

 





AVLTrees

RotateLeft

RotateRight

DoubleRotateRight







TomH-AVL-Student.zip


# 20

10/29

TH


AVL DoubleRotates

Recordings/2320-10-29-20.zip


TomH-AVL-Student.zip
Final-Project-DA_AVLTree-1-HW.zip
Due 11/10
# 21

11/3

TU

  Exam II
Open Book - Open Note
During Class



TomH-AVL-Student.zip




Final-Project-DA_AVLTree-1-HW.zip
Due 11/10


# 22

11/5

TH

Database II

Recordings/2320-11-2-20.zip


 Desktop.zip
   
 

# 23

11/10

TU

Database III

Recordings/2320-11-10-20.zip

 Desktop.zip

Complete Single Rotate Left & Testing ForThursday.
Complete The Dump - Work On Double Rotate Right
For Thursday.

FinalProject-DA-AVLTree-2-HW.zip
Due 11/19
All Four Rotations

I Will Provide You WIth Some Final Test Code
That You Must Include In Your Project On 11/18

# 24

11/12

TH

   
Database IV

Recordings/2320-11-12-20.zip

 



Cross-Joins-B-Tree-Indexing-Slides.pdf

 Desktop.zip


FinalProject-DA-AVLTree-2-HW.zip
Due 11/19

Project Will Be Accepted Late  --> Up Until
12/9 With No Late Penalty

# 25

11/17

TU

Database V

Recordings/2320-11-17-20.zip

Cross-Joins-B-Tree-Indexing-Slides.pdf


 

FinalProject-DA-AVLTree-2-HW.zip
Due 11/19

Project Will Be Accepted Late  --> Up Until
12/9 With No Late Penalty

# 26

11/19

TH



Red Black Trees

Recordings/2320-11-19-20.zip


Red-Black-Trees.pdf

Finish & Test AVL Project

Study For Test
Review B B+ Trees
Calculate M
Sketch From DataSet

Review AVL Trees
Sketch From DataSet

Review Database

There Will Be Internal Memory &
Direct Access Functions On Exam

You Will Not Have To Code AVL Rotations
You Will Not Have To Code B+ Trees


# 27

11/24

TU


THANKSGIVING

   

  FinalProject-DA-AVLTree-2-HW.zip
Due 11/19

Project Will Be Accepted Late  --> Up Until
12/9 With No Late Penalty

# 28

11/26

TH

THANKSGIVING

  FinalProject-DA-AVLTree-2-HW.zip
Due 11/19

Project Will Be Accepted Late  --> Up Until
12/9 With No Late Penalty

#29

12/11

TU

Exam III    

#30

12/3

TU

Exam III 
Open Book - Open Note
During Class
   

#31

12/8

TH

 

   




RD

12/9

M




READING DAY





    READING DAY





    READING DAY



RD

12/10

TU



    READING DAY




    READING DAY




    READING DAY


+

No Assignments Will Be Accepted After Noon on 12/9