CS1110 - Computer Science I    (Java)
Fall 2018 - Dr. Kaminski
Tentative Schedule
7/23/2018
ToDo links NOT LIVE til shortly before that date
lect/date
Tuesday lecture
lab
Thursday lecture
1

Aug 28-30
WMU Fall semester starts Wed Aug 29 NO
LABS
THIS
WEEK

(1st Week)
General Course Info   & Help/tutoring info

REFERENCE: 
Java Docs (basics)  web link

ToDo > >
2 - 3

Sep 4-6
Programming Basics
Java programs & NetBeans IDE
Console vs. GUI  I/O
  print & println methods
  JOptionPane class for user I/O
    input dialog box & output message box
concatenate [+]   (overloaded as add)
variables, data types
calculate [+ - * / %] & store data [=]
    / as integer divide vs. floating point divide

ToDo > >
LabEx1

Asgn 1
calc's,
userI/O
DUE:
   in ~2 weeks
self-documenting code
input dialog box (JOptionPane)
data type conversions, casting
re-use variables
simple String methods
    (length,toUpperCase,toLowerCase)
 combined arithmetic/asgn operators
store values for later vs. use right away
algorithm design using comments
IPO-S for program design
incremental development
ToDo > >
4 - 5

Sep 11-13
Control Structures
flow of control #1:  decisions
if, if/else
relational conditions
logical operators (! && ||)
algor: odd or even
algor: boolean flag
named constants (final)
empty statements

ToDo > >
LabEx2


stacked & nested if/else's
switch (for stack of if/else's)
simple String class methods
    (compareTo, charAt)
algor: extract digits/chars from int/String
printf (fancy, formatted output)



ToDo > >
6 - 7

Sep 18-20
flow of control #2a:  looping
while loop (event-controlled loop)
stacked vs nested vs. controller
algor: running total, n, ave, min, max
algor: sentinels on a data stream
algor: loop str: read/process vs.process/read
do/while loop (postTest)
ToDo > >
LabEx3 flow of control #2b:  looping
for loop (counter-controlled)
nested loops
drawing big characters
userData validation
i++ issues (vs. ++i)
break (or continue) in loop - bad
ToDo > >
8 - 9

Sep 25-27
Modular Programming
flow of control #3: methods & calling
static methods
input parameters & return values
algor: split a number into chunks
local variables
Math class methods

ToDo > >
LabEx4


methods in a separate class (& file)
modular design of earlier programs
algor design:  hierarchy of calls
    passing parameters
overloaded methods

more String methods (substring,
  replace,trim,pad,indexOf
)
static methods vs. String (OOP) methods
ToDo > >
10 - 11

Oct 2-4
File I/O
print to a file (& append to a file)
read from a file (and EOF detection)
Scanner class (for keyboard & file input)
read/process loop structures for files
Random class (random number generator)
    pass randomObject as parameter



ToDo > >
LabEx5

EXAM
#1

(on lab
machines)



split a csv string
a
.csv file - split a line into fields

Arrays (Storage)
data & processing it:
    storage bin vs. stream of data
declare array, fill it with data: initializer list
using for loops with arrays
parallel arrays
fill array options:  hardCode,  askUser,
    from calculations
from data file
ToDo > >
12 - 13

Oct 9-11
algor:  3 algor to do print an E
algor:  findMin, findMax, findIndexOfMax, . . .
    for stored data (vs. stream of data)
array of counters for categories
    (call method to decide index)
pass array as parameter
    pass-by-value vs. pass-by-reference issues
return array from a method
clean up input data read from a file
    (more string processing methods)
ASCII codes, cast to char/int, char arithmetic
ToDo > >
LabEx6

array size (vs. file size) options
    process
partly-filled array (n vs. length)
   (?  pass in array & N as parameters)
special for loop for arrays
algor:  reverse, compare
2-dim rectangular array
Is a string all digits?
    Character.isDigit boolean method
return as immediate exit
read file in a separate method

ToDo > >
14

Oct 16-18
Arrays class sort & copyOf
Searching Arrays
linear search (1 match vs. multi-matches)
   
& binary search
      [issues regarding 2-conditions]
Big O notation (Order of complexity)
re-use a class (& its methods)
adapt code:  search String array
    search & use parallel arrays

ToDo > >
NO
LABS
THIS
WEEK

(Fall Break)
:
Fall Break

15 - 16

Oct 23-25
copy & sort subArray
Sorting Arrays
algorithms:  insertion sort, selection sort
adapt code:  sort String array
    sort parallel arrays
Big O notation (Order of complexity)


ToDo > >
LabEx7

Object-Oriented Programming (OOP)
classes & objects (attributes & behaviors)
    [static methods vs. OOP class methods]
UML diagram for class design
public vs. private members
declaring/using multiple objects
getters & setters & constructors (overloaded)
toString & String.format methods
ToDo > >
17 - 18

Oct 30-
    Nov 1
pass object as parameter
static variable to count objects
   
& its static getter
static constants in an OOP class
constructor as "mini-main"
read data from file (or user) to fill object
setters/getters for editing/translating
re-use just 1 object for file processing
[auto-generate getters/setters/toString]
ToDo > >
LabEx8

this (to refer to inst. var. in setter)
object is an array (or parallel arrays)
global (to this class) declarations
    (divide declaration into 2 parts)
array of objects - 2-step declaration

(SystemDate classes)


ToDo > >
19 - 20

Nov 6-8
array of objects
   fill it from a data file

   sort it on a sortKey
   (user getter for sortKey values)
[adapting sort algor. for objects]
2 levels of objects
ToDo > >
LabEx9


EXAM #2  (in lecture)
MUST BRING LAPTOP TO TAKE EXAM ON.
Windows-10 people - fix auto-update problem.
Covers everything since start of class, including
    material from textbook, lectures, lab exercises,
    and all asgns thus far.

21 - 22

Nov 13-15
more sort & search array of objects
    - approxEqual for doubles
scope of variables & hiding/shadowing
    & global variables
other ways to declare an object
this
(for constructor calls a constructor)
copy constructor
OOP utilities:  copy object, compare 2 objects
return object from a method

[DEBUG & LOG boolean flags]
ToDo > >
LabEx10 algor:  add/remove from a sorted array
algor:  load & save:  file <--> array
[TESTING boolean flag]

ArrayList
  class & its methods
parallel ArrayList's
String.valueOf (convert object to String for get)



ToDo > >
23

Nov 20-22
ArrayList of objects
sort & search ArrayList of objects
  
"compareTo" type utility method in OOP class
   2 levels of getting
        
(get object, get field in object)
Miscellaneous Topics
recursion
exception handling (try/catch)
ToDo > >
NO
LABS
THIS
WEEK

(Thanksgiving
Break)


program calls a program (test driver)     multiple programs in a project     main's parameter
Thanksgiving Break

(officially WMU break starts Wed. at noon)


24 - 25

Nov 27-29
command-line arguments
variable-length argument list

delete a file, does file exists, file size
    pause program execution
other file-handling classes
    read/process vs. process/read
ToDo > >
LabEx11 floating point issues program calls a program (test driver)
    multiple programs in a project
    main's parameter
file path (location)
floating point issues

floating point issues
ToDo > >
26

Dec 4-6
NO LECTURE TODAY - but there's still a Tuedays LAB
Senior Engineering Design Conference

   
see conference schedule & brochure
LabEx12
Yes
there's
lab on
Tuesday

review for exam
27

Wed

Dec 12
EXAM #3  (in lecture) - 10:15 WEDNESDAY
MUST BRING LAPTOP TO TAKE EXAM ON.
Windows-10 people - fix auto-update problem.
Covers everything since start of class, including
     material from textbook, lectures,
lab exercises,
     and all asgns,

NO
LABS
THIS
WEEK

(Exam
Week)
no WMU regular classes/labs during exam week