CSC 1051: Algorithms and Data Structures I

  Spring 2016

Dr. MaryAngela Papalaskari  Office Hours Mendel 162C: Tuesdays: 11:30-1:00pm; Thursdays: 4:30-6:00; Fridays: 9:30-10:30am; or by appointment
Dr P Office hours
last week of classes & REVIEWsee note below.
Teaching Assistant: Kyle Recktenwald -  Office hours Mendel 292: Wednesdays 4-6pm; Thursdays 11:30am-1:30pm

course information                blackboard                  piazza                   help                  exam archive

Schedule and materials will be updated frequently. Please bookmark and check often.

Week
Topic
Reading and Exercises
Labs, Projects, and other assignments
Jan
12
Course introduction
Overview of Computer Science
History of Computing
Data representation
Introduction to Java
slides - 4up
Reading: Chapter 1 (all) & Chapter 2 sections 2.1, 2.2
Exercises:
EX 1.14, 1.15, 1.16, 1.17, 1.19, 1.20
EX 2.3 - 2.6
[Textbook 7th edition numbers: 1.15-1.20 & 2.2-2.5]
Always do all self-review exercises when you review material from text
The quiz next Tuesday will be on Chapter 1&2  material we covered until Friday 1/15/16 and the work we did in the lab.
Code: Lincoln.java  Lincoln2.java  Lincoln3.java
  Roses.java  Facts.java   Countdown.java  
Install jGrasp on your laptop

Lab 1

Project 1 - due Thursday 1/21/16
Jan
19
Data and algorithms
Variables, assignment statements, arithmetic expressions, interactive programs
slides - 4up


Reading: Section   2.1 - 2.4 and 2.6

Exercises:
EX 2.7 - 2.10 and 2.12 (& exercises in slide handouts)
[Textbook 7th edition numbers: 2.6-2.9 and 2.11]
Code: GPA.java  TellMeAboutYou.java

Lab 2

Project 2 - due Thursday 1/28/16


Jan
26
Control flow& conditionals
if/else statements, boolean expressions, block statements, nested statements
slides - 4up





Reading: Sections 5.1, 5.2
pages 208-218 and 221-226 (skip coin example in listings 5.3, 5.4 for now)

Exercises:
EX 5.1-5.5
[Reading and exercises are the same for textbook 7th and 8th editions]
Code: Echo.java  GasMileage.java  GPA.java  GPA_Updated.java  MaximumVersionX.java



Lab 3


Project 3 - due Thursday 2/4/16


Feb
2
Repetition Structures
Algorithms with loops; the Java while statement
slides - 2up




Reading: Section 5.4

Exercises: EX 5.7-5.11

Code:   SquaresAndCubes.java, PowersOfTwoAndThree.java
PrimeFactors.javaManyBoxes.java
Lab 4


Project 4 - due Thursday 2/11/16
Feb
9
Data representation and Applets
Binary numbers, binary representation of text and images, Java primitive data types, type conversions, java applets and the Graphics class

slides - 4up


Reading: Sections 1.1, 2.3, 2.7-2.9

Exercises:
EX 1.2-1.6 (Ch 1)
EX  2.14-2.19(Ch 2)
[ Textbook 7th edition numbers:
Ch 1: same as above
Ch 2:  2.13-2.18]
Code: Einstein.java, Snowman.java  Snowman.html

Lab 5

Project 5 - due Tueday 2/23/16

Feb
16
Using classes and objects
The Java API;
Random, Math, String classes
slides - 4up


Tuesday: Section 1 class canceled due to University weather-related closing. No in-class quiz for either section of the course on Tuesday. Instead, Lab 6 parts A & B homework for Thursday will count as quiz for this week.
Reading: Sections 2.5, 3.1-3.5

Exercises: EX 2.11, 3.1-3.10
[ Textbook 7th edition numbers: 2.10, 3.1 - 3.9
(Exercise 3.3 is new to 8th ed)]

For midterm next week: Review sections and material we covered from Chapters 1, 2, 3, 5 and work through sample algorithm questions

Code:
  Quadratic.java  RandomNumbers.java PalindromeTester.java





Lab 6

Project 5 - due Tuesday 2/23/16

Feb
23

Graphical user interfaces
Java containers: JFrame, JPanel, JLabel
slides - 4up
Tuesday: NO QUIZ (proj 5 due date)
Thursday: 2/25 Midterm Exam Mendel 101
* NOTE classroom change *
Friday: Lab 7

Reading: Sections 3.9 - 3.11 & 4.6 (only first example, stop at page 185)

Code:  Authority.java NestedPanels.java LabelDemo.java
SmilingFacePanel.java SmilingFace.java


Lab 7
                         Spring Break                                                
Mar
8
Designing Classes
user-defined datatypes; class definitions as blueprints for objects; constructors; method definitions
slides - 4up
Reading: Sections 4.1-4.5
Exercises: EX 4.1-4.4
Code:
Account.java,   Transactions.java (our versions)
Account.java   Transactions.java (book version)
Die.java  RollingDice.java


Project 5 gallery
NOTE: Lab 8 will be submitted on Blackboard and also checked in class.

Lab 8
 Part A: homework due Thu  3/10
[submit Part A on blackboard by Thur 8:00am ]
 Parts B & C: Thursday lab
 Part D: homework due Friday 3/11
[submit Parts B, C, D on blackboard by Friday 5:00pm]

Projectimport java.text.NumberFormat;import java.text.NumberFormat;import java.text.NumberFormat; 6 - due Friday 3/19
Mar
15
Selection and Repetition revisited
the conditional operator; the switch statement;  do and for loops
slides - 4up


Reading:  6.1-6.6 (skip for-each loop pg282)
Exercises: EX6.1 - EX6.17

Code:
 
GradeReport.java    SwitchExample.java
  EvenOdd.java    ReverseNumber.java
  ReverseNumberAsString.java    Stars.java
  ResponseTimeExperiment.java


Lab 9
 


Project 7 - due Friday 4/1
Mar
22
Selection and Repetition revisited
(continued: focus on nested for loops)

Tuesday March 22: Lab 10 - (NO QUIZ)

March 24 & 25 -- Easter Recess
Reading:  6.1-6.6 (skip for-each loop pg282)
Exercises: EX6.1 - EX6.17

Code:
 
GradeReport.java    SwitchExample.java
  EvenOdd.java    ReverseNumber.java
  ReverseNumberAsString.java    Stars.java
  ResponseTimeExperiment.java

Lab 10

Mar
29
Arrays
declaration, instantiation, initialization
processing arrays using for-loops
initialization lists and for-each loops
slides - 4up

Tuesday March 29: (QUIZ on material of previous two weeks)
Reading: 8.1, 8.2
Exercises: EX8.1-8.8
Code:
BasicArray.java  LetterCount.java   ReverseOrder.java  LetterCount.java

Lab 11
Part I: homework due Thu  3/31
[submit Part I on blackboard by Thur 8:00am ]
 Part II: Thursday lab
[have your work checked in lab and submit Part II on blackboard by Fri 5:00pm ]

Apr
5
Arrays, continued
arrays as parameters, command-line arguments, polygons and polylines
slides - 4up
GO Cats!!!!NO QUIZ this week
Reading: 8.3, 8.4, 8.7
Exercises: EX8.9-8.10

Code:
TrianglePanel.java
DVD.java     TestDVD.java
DVDCollection.java    Movies.java
TwoDArray.java  SodaSurvey.java



Lab 12


Project 8 - due Tuesday 4/12 (deadline extended)
Apr
12
Arrays, continued
arrays of objects
2D arrays, processing row by row and column by column
slides - 4up
(handout from last week)

File input
iterators, using Scanner to input from files,
IOException
slides - 4up
Reading:  5.5, 8.6
Exercises: 11.1-11.4

Code:
FileInput.java SomethingToDoWithFiles.java URLDissector.java
TwoDArray.java  SodaSurvey.java

data files:
urls.txt  onehundredints.txt  eightwords.txt 


Lab 13
Part I: homework due Thu  4/14
[submit Part I on blackboard by Thur 8:00am ]
 Part II: Thursday lab
[have your work checked in lab and submit Part II on blackboard by Tue 4/19 8:00am (deadline extended) ]

2D Array Exercise
[Extra exercise to prepare for quiz next week)
Apr
19
File I/O and exceptions
I/O streams, the PrintWriter class, exception handling, Java Exception class hierarchy
slides - 4up

Reading:  11.1-11.3, 11.5,11.6
Excercises: No exercises from book, but be sure to review Lab 14
and
Code:
TestData.java  Zero.java   ProductCodes.java 
CreatingExceptions.java  ResponseTimesExperiment.java

Lab 14

Project 9 - due Thursday 4/28
(Optional - Extra Credit)

Apr
26
Events & Listeners  (optional material)
events, listeners, the Timer class, animation
slides - 4up

last class notes
Reading:  4.8, 4.9,  9.8

Code:
PushCounter.java
  PushCounterPanel.java
Rebound.java  ReboundPanel.java  happyFace.gif
Fahrenheit.java    FahrenheitPanel.java
Lab 15   (Optional)

Final Exam Week

Extra Review session:
Friday April 29, 3-4:30pm Mendel G86 (regular classroom)
Office hours last week of classes:
Tue 4/26 11:30am -1:00pm
Thu 4/28 3:00pm -5:30pm

Final Exam :  Monday May 2  11:30am-2:00pm Mendel 154





Websites for previous semesters:      Fall 2015         Spring 2015        Fall 2014       Spring 2014       Fall 2013     Spring 2013        Fall 2012       Spring 2012        Fall 2011