Computer Science I
Dr. Tom Hicks - Trinity University - CSCI 1320  -  Spring 2021 - Tentative Schedule - 9:55 TT

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

# Topic(s) Reading Assignments
 & Handouts
Laboratory Assignment


# 1

1/26

TU


 Introduction To Class
Discuss Course Outline

Chapter 1

Computer Science
Computer Programming
Designing, Writing, Testing Debugging, Maintaining
CS Salaries
CS - Young Science
Charles Babbage
Ada Lovelace
Alan Turing - Turing Award
Alonzo Church - Lamda Calculus
Eniac
Software
BIOS Software
Operating Systems
Hardware
Motherboard, Processor, Cooling Fan,
Machine Language
Processor Cycles
Binary Digits (0,1) - Bit
Processor Instruction Set
Voltage
Transistors
von Neumann Architecture
Memory
Bus
 Machine Language
Processor Cycles
Binary Digits (0,1) - Bit
Processor Instruction Set
Voltage
Transistors
von Neumann Architecture
Memory
Bus
Assembly Language
Assembler
Compilers
High-Level Languages
Scala
Interpreter
Scala - Java Virtual Machine
Scala Portability
Scala Multiplatform
Martin Odersky - Creator Scala
Scala - open source
Programming Paradigms
Imperative Paradigm
Functional Paradigm
Object Oriented Paradigm
Scala - Hybrid Language
Basic Integer Operations
Integer Division
math.pow(2,3) - Exponentiation
Int - Integer Variables
Double - Double Variables
Order Of Operations - Correct
Modulus
REPL - Read-Evaluate-Print-Loop
Numeric Literal - 0,5,3
res0 - result0
Strings - String Variables
Line Comments //
Block Comments /*   */
val vs. var ??
String Concatenation +
print & println
Int - +/- 2 billion - 4 bytes
var - variable - can be changed
val - constant - no change
Double - decimal numbers
double - float - not exact

 Course Outline

PCS1-Ch-1A-Intro-Scala-Slides

Read Chapter 1

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

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

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

CH-1A-Intro-To-CS-Scala-HW.zip


# 2

1/28

TH


Chapter 2

Machine Language
Processor Cycles
Binary Digits (0,1) - Bit
Processor Instruction Set
Voltage
Transistors
von Neumann Architecture
Memory
Bus
Assembly Language
Assembler
Compilers
High-Level Languages
Scala
Interpreter
Scala - Java Virtual Machine
Scala Portability
Scala Multiplatform
Martin Odersky - Creator Scala
Scala - open source
Programming Paradigms
Imperative Paradigm
Functional Paradigm
Object Oriented Paradigm
Scala - Hybrid Language
Basic Integer Operations
Integer Division
math.pow(2,3) - Exponentiation
Int - Integer Variables
Double - Double Variables
Order Of Operations - Correct
Modulus
REPL - Read-Evaluate-Print-Loop
Numeric Literal - 0,5,3
res0 - result0
Strings - String Variables
Line Comments //
Block Comments /*   */
val vs. var ??
String Concatenation +
print & println
Int - +/- 2 billion - 4 bytes
var - variable - can be changed
val - constant - no change
Double - decimal numbers
double - float - not exact

 

PCS1-Ch-2A-Intro-Linux-Slides


Read At Least The First Half Of Chapter 2
PCS1-Ch-2A-Linux-HW.zip

# 3

2/2

TU

  

Chapter 2B
Basics & Scripts
 
Byte - 8 bits
Short - 2 bytes - 16 bits
Int - 4 bytes - 32 bits
Long - 8 bytes - 64 bits
Char - 8 bits - single quotes
String - double quotes - \n
String - \\ - \' - \"
Boolean - true = false
Float - 4 bytes - 32 bits
Double - 4 bytes - 32 bits
.toString Conversion
.toInt Conversion
.toByte Conversion
.toLong Conversion
.toFloat Conversion
.toDoubleConversion
6 Logical Operators
<, <=,  >, >=, ==, !=
AND &&, OR || , NOT !
String Concatenation
String Repeat
Tuples ( , , )
2-tuple 5 -> 9
readInt
readDouble
readLine
Interactive Program
Scripts vs Applications
Scripts -> no scalac
shortcuts & abbreviations

   

PCS1-Ch-2B-Scala-Basics-Slides



PCS1-Ch-2B-Scala-Basics-HW


# 4

2/4

TH


Chapter 2C
Numeration & Basics

Decimal Numeration System
Decimal Counting Numbers
Binary Numeration System
Binary Counting Numbers
Euler Process
Convert Base 10 to Base 2
Convert Base 2 to Base 10
Octal Numeration System
Octal Counting Numbers
Euler Process
Convert Base 10 to Base 8
Convert Base 8 to Base 2
Convert Base 2 to Base 8
Convert Base 8 to Base 10
Hexadecimal Numeration System
Hexadecimal Counting Numbers
Euler Process
Convert Base 16 to Base 10
Convert Base 10 to Base 162
Convert Base 16 to Base 2
Convert Base 2 to Base 16
Storage Of Positive Integers
Sign Bit - High Bit
Bits Numbered From Zero
Sign Magnitude - Negative Integers
One's Complement - Negative Integers
Two's Complement - Negative Integers
.toBinaryString
.toOctalString
.toHexString
Addition Of Base Two Numbers
Subtraction Of Base Two Numbers
Math Defaults -> Int & Double
Why Know?

 

 PCS1-Ch-2C-Numeration-Slides.pdf

PCS1-Ch-2C-Numeration-HW.zip

# 5

2/9

TU

 

Chapter 3-A
Conditional Logic
 
George Boole
Linux GUI Editor gedit&
Multiple Windows
if then
if then else
Amusement Park Program
Testing A Program
String Equivalence eq
Mathematical Order Operations
Food Cost Calculation Program
Good Error Messages
Test!
match statement


PCS1-Ch-3A-Conditional-Logic-Slides.pdf

 

Read Chapter 3

 

PCS1-Ch-3A-Conditional-Logic-HW.zip
   

# 6

2/11

TH

Work On Chapter 4  


 

# 7

2/16

TU

ICE STORM




# 8

2/18

TH


ICE STORM

   

# 9

2/23

TU

Classes Cancelled    

# 10

2/25

TH

 
Chapter 3-B - Chapter 8
Loops

length - String
.toUpperCase
.toLowerCase
.substring(N,M)
short-cuts
+=, -=, *=, /=, %=
while - pretest loop
When To Use While Loop
Examples
do while - posttest loop
When To Use Do While Loop
Examples
for - fixed repetition loop
When To Use For Loop
Examples
formatted printf ("%5d"
formatted printf ("%5.2f"
str(N) - Returns String Character


 
Chapter 4
Functions With Explicit Returns
 

max(x,y) - Return Largest Of Two Ints
Function Format
max(x,y,z) - Return Largest Of Three Ints
areaTriangle (height, base) - Return Area
volumeTriangularPrism (triangleHeight: Double, triangleBase: Double, prismHeight: Double)
upChar - Return Capital
secondsToTimeString(totalSeconds:Int)

   

 

PCS1-Ch-3B-Basic-Loops-Slides.pdf

PCS1-Ch-4A-Functions-1-Slides.pdf



PCS1-Ch-3B-Basic-Loops-HW.zip


PCS1-Ch-4A-Functions-1.zip

# 11

3/2

TU


Chapter 4
Functions Without Explicit
Returns

Non-Funcional Functions
def Menu1( ):Unit =
def Menu2( )
def greetings(who:String)
isInteger(str:String):Boolean =

Tuple Review
Functions That Return Tuples
def squares1 (no:Int) : (Int, Int) =
def getOfficer( ): (String, String, String) =
var x = getOfficer()
var (name, rank, serialNo) = getOfficer()
getLong( )
getDouble( )
Write Good Tests
Test Functions Well
Program Decompostition
Function Naming
Top Down Design
Programming Paradigm
Imperative Paradigm
Functional Paradigm
Object Oriented Paradigm
Scala - Multi-Paradigm Language

Optional Arguments


 

 

PCS1-Ch-4B-Functions-2.zip

# 12

3/4

TH




 

   

 
# 13

3/9

TU

 

Exam 1 

 

   

# 14

3/11

TH

 

 

   

# 15

3/16

TU

 
   


 

# 16

3/18

TH

 



   


# 17

3/23

TU

 



   
 

# 18

3/25

TH

Mid Term Grades Due 3/28




 

# 19

3/30

TU






 

# 20

4/1

TH

 



   



# 21

4/6

TU




   
 

# 22

4/8

TH

   
 

 


# 23

4/13

TU

 

   

 

 

# 24

4/15

TH

Classes Cancelled


   

 


# 25

4/20

TU






   
 

# 26

4/22

TH


 

 
 

# 27

4/27

TU











# 28

4/29

TH


   

# 29

5/4

TU

     





 


# 30

5/6

TU

     





 


R1

 

5/10

M





    READING DAY






    READING DAY






    READING DAY



R2

5/11

TU





    READING DAY






    READING DAY






    READING DAY


+

No Assignments Will Be Accepted After Noon on 12/7