Computer Science I Notes & Code

Professor Evan Korth

Clinical Associate Professor
Computer Science Department
Courant Institute of Mathematical Sciences
New York University

Email (add @cs.nyu.edu): korth
251 Mercer Street, Room 319
New York City, 10012
Tel.: 212-998-3301



Notes & Code

Class Date Topic
Class Programs
Readings
Class Lectures
1 Jan 29   Intro to class
2 Jan 31 Programs from chapter 2 slides: ComputeArea.html, DisplayTime.html, FahrenheitToCelsius.html, SalesTax.html, DisplayUnicode.html, ComputeLoan.html, ComputeChange.html, ShowCurrentTime.html, TestScanner.html
Programs from chapter 3 slides: LeapYear.html, LearnAddition.html, ComputeTaxWithSelectionStatement.html, SubtractionTutor.html, GuessBirthDate.html
Programs from chapter 4 slides: SubtractionTutorLoop.html, SentinelValue.html, TestSum.html, TestMultiplicationTable.html, GreatestCommonDivisor.html, FindSalesAmount.html, PrintPyramid.html, TestBreak.html, TestContinue.html, PrimeNumber.html
Programs from chapter 5 slides: TestMax.html, TestPassByValue.html, TestMethodOverloading.html, ComputeTaxWithMethod.html, PrintCalendar.html, PrintCalendarSkeleton.html
Also see corresponding notes and lectures for all three chapters from my Spring 2007 0002 class
And Professor Engel's Python to Java notes
Liang Chapter 2
Liang Chapter 3
Liang Chapter 4
Liang Chapter 5
Additional Slides for Methods
3 Feb 5
4 Feb 7
5 Feb 12
6 Feb 14
7 Feb 19
8 Feb 21 cut and paste from slides
DynamicFibonacci.txt
Recursion
9 Feb 26 Array1.txt, Array2.txt, Array3.txt, Histogram.txt, RollDie.txt, Arrays 1 (partial)
10 Feb 28 TestCircle.txt, TestSwitch.txt, TestCircleWithConstructors.txt, TimeTest1.txt Objects & Classes 1
11 Mar 5 CircleWithAccessors.txt, TestCircleWithAccessors.txt, CircleWithStaticVariable.txt, TestCircleWithStaticVariable.txt, TestDate.txt
TestSmallInt.txt
Objects & Classes 2
discussion of binary, hexadecimal
12 Mar 7
13 Mar 12 HourlyEmployee.txt, TestHourlyEmployee.txt, TestRectangle.txt, Rectangle.txt, Stock.txt, TestStock.txt, IntegerPower.txt, ShiftArray.txt, SumArray.txt  
14 Mar 14 Midterm
15 Mar 26 TestPassArray.txt, MakeHot.txt, MakeArrayInMethod.txt, TestCopyArray1.txt TestCopyArray2.txt, TestCopyArray3.txt
TicTacToe.txt, TestLength.txt, TestMatrixOperation.txt, GradeExam.txt
TotalArea.txt
GameOfLife.txt
Arrays 1
Arrays 2
Arrays of Objects
16 Mar 28 ThisTest.txt, Time2.txt, TimeTest2.txt, Date.txt, Employee.txt, EmployeeTest.txt, TestPassingObject.txt Objects & Classes 3
17 Apr 2 GeometricObject.txt, Circle.txt, Rectangle.txt, TestCircleRectangle.txt
Cylinder.txt, TestCircleCylinderRectangle.txt
Inheritance
18 Apr 4 modifications to programs from previous classes were made in class Inheritance, Object class, Intro to Polymorphism (also arrays of objects review)
19 Apr 9 Same class hierarchy with equals() methods and test instanceof operator
GeometricObject.txt, Circle.txt, Rectangle.txt, Cylinder.txt, TestCircleCylinderRectangle.txt
TestCircleCylinderRectangle2.txt (try both GeometricObject files), GeometricObject.txt (with abstract methods)
Employee.txt, SalariedEmployee.txt, HourlyEmployee.txt, CommissionEmployee.txt, BasePlusCommissionEmployee.txt, PayrollSystemTest.txt
casting objects and abstract classes
20 Apr 11
21 Apr 16
22 Apr 18 Sudoku.txt. TestWordFind.txt
LinearSearch.txt, BinarySearch.txt, SelectionSort.txt, BubbleSort.txt
Sort and Search
23 Apr 23 Quiz  
24 Apr 25 TestComparableBinarySearch.txt, TestComparableMax.txt, TestObjectEqualsLinearSearch.txt, Tokenizer1.txt, Tokenizer2.txt, Tokenizer3.txt, TestDatabase.txt interfaces
25 Apr 30 Chapter 13:
MyFrame.html, MyFrameWithComponents.html, ShowFlowLayout.html, ShowGridLayout.html, ShowBorderLayout.html, TestPanels.html, TestSwingCommonFeatures.html, TestImageIcon.html
Chapter 14:
TestGetGraphics.html, TestPaintComponent.html, TestPanelDrawing.html, FigurePanel.html, TestFigurePanel.html, DrawArcs.html, DrawPolygon.html, TestCenterMessage.html, MessagePanel.html, TestMessagePanel.html, StillClock.html, DisplayClock.html, DisplayImage.html, SixFlags.html, ImageViewer.html
Chapter 15:
HandleEvent.html, SimpleEventDemo.html, ShowInnerClass.html, SimpleEventDemoInnerClass.html, AnonymousListenerDemo.html, ControlBall.html, TestWindowEvent.html, TestMultipleListener.html, AdapterDemo.html, MoveMessageDemo.html, KeyEventDemo.html, AnimationDemo.html, ClockAnimation.html
Chapter 16:
images directory, TestButtonIcons.html, ButtonDemo.html, CheckBoxDemo.html, RadioButtonDemo.html, TextFieldDemo.html, DescriptionPanel.html, TextAreaDemo.html, ComboBoxDemo.html, ListDemo.html, ScrollBarDemo.html, SliderDemo.html, MultipleWindowsDemo.html, Histogram.html, ButtonColors.txt, TestButtons2.txt
Liang chapter 13 GUIBasics
Liang chapter 14 Graphics
Liang chapter 15 EventDrivenProgramming
Liang chapter 16 CreatingUserInterface
26 May 2
27 May 7
28 May 9 String.txt (from the Java API), MyString.txt, TestMyString.txt
(solution using only stuff from this class - still not modular) Person.txt, Employee.txt, Student.txt, Staff.txt, Faculty.txt, TestPerson.txt
(solution using some concepts we have not covered but can understand - this is more modular - can still be improved) Person.txt, Employee.txt, Student.txt, Staff.txt, Faculty.txt, TestPerson.txt
Building.txt, AcademicBuilding.txt, ResidentialBuilding.txt, EmployeeHousing.txt, Dormitory.txt
Cipher.txt, TestMagicSquare.txt, Minesweep.txt