CS151 Computer Science I
Lecture demos
- Week 1 lectures: The ADD operator example.
- Week 1 lectures: The Arithmetic example.
- Week 1 lectures: The numeric input example.
- Week 1 lectures: Inputing floating point values example.
- Week 1 lectures: Example on coversions between data types (using casting).
- Week 2 lectures: The Right Triangle example (if - else statement).
- Week 2 lectures: The Switch statement example.
- Week 2 lectures: Computing factors example (while statement).
- Week 2 lectures: Find avarage and highest grades example (while statement).
- Week 2 lectures: How long money should stay in a bank example (while statement).
- Week 2 lectures: A nested loop example.
- Week 2 lectures: Example on for
loops and switch statement.
- Week 2 lectures: While loops vs do loops vs for loops (a comparison example).
- Week 2 lectures: The StringTokenizer example version 1, and version 2.
- Week 2 lectures: Flipping a coin example (the Random class example).
- Week 2 lectures: Rolling a dice example (the Random class example).
- Week 2 lectures: The date verification example problem description and pseudo code and the code.
- Week 3 lectures: A simple Bank Account example.
- Week 3 lectures: The parameter passing example.
- Week 3 lectures: The Triangle problem from homework 4: More than just a hint.
- Week 3 lectures: Creating your own classes, Selecting a computer example.
- Week 3 lectures: The CD example from Lewis & Loftus, previous edition.
- Week 3 lectures: The Circle example.
- Week 3 lectures: The Rectangles example
- Week 3 lectures: The Bank example, which uses a static method.
- Week 3 lectures: The URL example, using the StringTokenizer class.
- Week 3 lectures: The Casino example illustrating method overloading.
- Week 4 lectures: The Sphere example illustrating aggregation and nested classes.
- Week 4 lectures: An example using a text file version 1, version 2, version 3, version 4, and the data file that goes with them.
- Week 4 lectures: The Salary Update example, and the data file that it uses.
- Week 4 lectures: An array example using a text file find the largest element and the data file that goes with it.
- Week 4 lectures: An array example find the avarage.
- Week 4 lectures: Array of counters example - the program and the data file that goes with it.
- Week 5 lectures: Command line arguments example.
- Week 5 lectures: The Monthly Sales example.
- Week 5 lectures: The Membership example.
- Week 5 lectures: An array of objects example.
- Week 5 lectures: Representation of multidimentional arrays example 1, example 2, example 3.
- Week 5 lectures: Vector with different data types example
- Week 5 lectures: StringBuffer class example
- Week 5 lectures: Inheritance example.
- Week 5 lectures: The inheritance example modified.
- Week 5 lectures: The Bank account example modified.
- Week 5 lectures: Inheritance example demonstrating overriding a supperclass method.
- Week 5 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,
and the following Java
applet.
-
Homework 1.
Deadline: June 2, 2019.
- Homework 2 -- see the textbook page 145, projects 3.2 and 3.5 AND page 249, project 5.1.
Deadline: June 9, 2019.
- !!! TEST 1 will be held on June 10 !!!
-
Homework 3.
Deadline: June 16, 2019.
- !!! TEST 2 will be held on June 19 !!!
-
Homework 4.
Deadline: June 21, 2019.
-
Homework 5.
Deadline: June 26, 2019.
- !!! Final exam will be held on June 27 !!!
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 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