CS151 Computer Science I
Lecture demos
- Week 2 lectures: The ADD operator example.
- Week 2 lectures: The Arithmetic example.
- Week 3 lectures: The numeric input example.
- Week 3 lectures: Inputing floating point values example.
- Week 3 lectures: Example on coversions between data types (using casting).
- Week 4 lectures: The Right Triangle example (if - else statement).
- Week 4 lectures: The Switch statement example.
- Week 5 lectures: Computing factors example (while statement).
- Week 6 lectures: Find avarage and highest grades example (while statement).
- Week 6 lectures: How long money should stay in a bank example (while statement).
- Week 6 lectures: A nested loop example.
- Week 7 lectures: Example on for
loops and switch statement.
- Week 7 lectures: While loops vs do loops vs for loops (a comparison example).
- Week 8 lectures: The StringTokenizer example version 1, and version 2.
- Week 8 lectures: Flipping a coin example (the Random class example).
- Week 9 lectures: Rolling a dice example (the Random class example).
- Week 9 lectures: The date verification example problem description and pseudo code and the code.
- Week 9 lectures: A simple Bank Account example.
- Week 9 lectures: The parameter passing example.
- Week 10 lectures: The Triangle problem from homework 4: More than just a hint.
- Week 10 lectures: Creating your own classes, Selecting a computer example.
- Week 10 lectures: The CD example from Lewis & Loftus, previous edition.
- Week 10 lectures: The Circle example.
- Week 10 lectures: The Rectangles example
- Week 11 lectures: The Bank example, which uses a static method.
- Week 11 lectures: The URL example, using the StringTokenizer class.
- Week 11 lectures: The Casino example illustrating method overloading.
- Week 11 lectures: The Sphere example illustrating aggregation and nested classes.
- Week 12 lectures: An example using a text file version 1, version 2, version 3, version 4, and the data file that goes with them.
- Week 12 lectures: The Salary Update example, and the data file that it uses.
- Week 12 lectures: An array example using a text file find the largest element and the data file that goes with it.
- Week 12 lectures: An array example find the avarage.
- Week 13 lectures: Array of counters example - the program and the data file that goes with it.
- Week 13 lectures: Command line arguments example.
- Week 13 lectures: The Monthly Sales example.
- Week 13 lectures: The Membership example.
- Week 14 lectures: An array of objects example.
- Week 14 lectures: Representation of multidimentional arrays example 1, example 2, example 3.
- Week 14 lectures: Vector with different data types example
- Week 14 lectures: StringBuffer class 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
- Get started and test your jdk installation by compiling and
running the following application programs: program 1,
program 2.
-
Homework 1.
Deadline: September 11, 2016.
-
Homework 2.
Deadline: September 25, 2015.
-
Homework 3.
Deadline: October 23, 2016.
- !!! TEST 1 will be held on October 19 (section 02) and October 20 (section 03), 2016 !!!
-
Homework 4.
Deadline: November 13, 2016.
- !!! TEST 2 will be held on November 21 (section 02) and November 22 (section 03) !!!
-
Homework 5.
Deadline: November 30, 2016.
-
Homework 6.
Deadline: December 11, 2016.
Lab exercises
- 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 2, version 1.
- Lab 3, problem 2, version 2.
- 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