CS151 Computer Science I
Lecture notes and demos
- Weeks 1 and 2 notes: Lecture notes: Chapter 1.
- Week 2 demo: The ADD operator example.
- Week 2 demo: The Arithmetic example.
- Week 3 notes: Lecture notes: Chapter 2.
- Week 3 demo: The numeric input example.
- Week 3 demo: Inputing floating point values example.
- Week 3 demo: Example on coversions between data types (using casting).
- Week 4 notes: Lecture notes: Chapter 3.
- Week 4 notes: Lecture notes: Increment and Decrement Operators.
- Week 4 notes: Lecture notes: Wrapper classes.
- Week 5 notes: Lecture notes: Chapter 5.
- Week 5 demo: The Right Triangle example (if - else statement).
- Weeks 5 and 6 notes: Lecture notes: Chapter 6.
- Week 5 demo: The Switch statement example.
- Week 5 demo: Computing factors example (while statement).
- Week 6 demo: Find avarage and highest grades example (while statement).
- Week 6 demo: How long money should stay in a bank example (while statement).
- Week 6 demo: A nested loop example.
- Week 6 demo: Example on for
loops and switch statement.
- Week 6 demo: While loops vs do loops vs for loops (a comparison example).
- Week 7 notes: Lecture notes:The Random Class.
- Week 7 demo: Flipping a coin example (the Random class example).
- Week 7 demo: Rolling a dice example (the Random class example).
- Week 7 demo: The StringTokenizer example version 1, and version 2.
- Week 7 notes: Lecture notes: More from Chapter 4.
- Week 7 demo: A simple Bank Account example.
- Week 8 demo: The date verification example problem description and pseudo code and the code.
- Week 8 demo: The URL example, using the StringTokenizer class.
- Week 8 demo: The Triangle problem from homework 3: More than just a hint.
- Week 9 notes: Lecture notes: Chapter 7.
- Week 9 demo: Selecting a computer example.
- Week 10 demo: The parameter passing example.
- Week 10 demo: The parameter passing example EXTENDED to show how we can actually exchange data as objects.
- Week 10 demo: The CD example from Lewis & Loftus, previous edition.
- Week 10 demo: The Circle example.
- Week 10 demo: The Rectangles example
- Week 10 demo: The Bank example, which uses a static method.
- Week 10 demo: The Casino example illustrating method overloading.
- Week 10 demo: The Sphere example illustrating aggregation and nested classes.
- Week 11 notes: Lecture notes on enumerated data typesfrom Chapters 3 and 7.
- Week 11 demo: An example using a text file version 1, version 2, version 3, version 4, and the data file that goes with them.
- Week 11 demo: The Salary Update example, and the data file that it uses.
- Weeks 12, 13 and 14 notes: Lecture notes: Arrays
- Week 12 demo: An array example using a text file find the largest element and the data file that goes with it.
- Week 12 demo: An array example find the avarage.
- Week 12 demo: Array of counters example - the program and the data file that goes with it.
- Week 12 lectures: Command line arguments example.
- Week 13 demo: The Membership example.
- Week 13 notes: Lecture notes: The ArrayList Class
- Week 14 demo: An array of objects example.
- Week 14 demo: Vector with different data types example
- Week 14 demo: StringBuffer class example
- Week 14 lectures: Representation of multidimentional arrays example 1, example 2, example 3.
- Week 14 demo: The Monthly Sales example.
- Week 15 lectures: Inheritance example.
- Week 15 lectures: The inheritance example modified.
- Week 15 lectures: The Bank account example modified.
- Week 15 lectures: Inheritance example demonstrating overriding a supperclass method.
- Week 15 lectures: The Bank account example extended.
Assignments and announcements
- All homeworks and announcements will be posted on BB
Lab exercises
- Get started and test your jdk installation by compiling and
running the following application programs: program 1,
program 2.
- Lab 1 problems.
- Pool program, version 1.
- Pool program, version 2.
- Yard program,version 1.
- Yard program,version 2.
- Lab 2 problems.
- Lab 2, problem 1.
- Lab 2, problem 2.
- Lab 2, problem 3.
- Lab 2, problem 4.
- Lab 2, problem 4 revised.
- Lab 3 problems.
- Lab 3, problem 1.
- Hints for Lab 3, problem 2:
(1) string input utilizing standard Java input,
and
(2) string input utilizing a method from the String class.
The complete program will be posted after discussing student versions
in class.
- Lab 3, problem 3.
- Lab 3, problem 4, version 1.
- Lab 3, problem 4, version 2.
- Lab 3, problem 5.
- Lab 3 problem 6.
Return to Zlatareva's Home Page