Examples from Lectures for CSC 120
- Lecture 36 — MUFrame.java for program that processes arrays of Car objects — 11/19
Car.java class definition file for this program — 11/19 - Lecture 35 — Some useful methods in the Java
Mathclass — 11/17
Math class reference page from W3Schools.com — 11/17
Demo Program that calculates the mean and std deviation of Integer samples — 11/17 - Lecture 33 — Finding sum, average, min and max of an array — 11/12
MUFrame class for a demo program for in-class example — 11/12
SoccerTeam class used in this example — 11/12 - Lecture 31 — How to process arrays — 11/7
MUFrame.java for program that processes all or some elements of an array — 11/7
MUPanel.java for this program — 11/7
Mouse.java class definition file for this program — 11/8
Object Scope and thethiskeyword — 11/7
MUPanel.java for a program illustrating the use ofthisto access class-level objects — 11/7
COLLISION DETECTION WEB PAGE SHOWN IN CLASS — 11/7 (needed for PA6) - Lecture 29 — Working with individual objects vs. working with arrays — 11/3
MUFrame.java for program that uses an array of Mouse objects — 11/3
MUPanel.java for this program — 11/3
Mouse.java class definition file for this program — 11/3 - Lecture 28 — How to Use Swing Components for a User Interface — 10/31
MUFrame.java that draws rows and columns of dots with spinners and sliders — 10/31
MUPanel.java for this program — 10/31 - Lecture 26 — Using a for loop to generate a series of values — 10/27
- Lecture 23 — Finding the total, average, maximum and minimum of a series of values entered by the user — 10/20
- Lecture 22 — Program that shows use of getText and setText with TextFields, TextAreas and Labels — 10/15
- Lecture 21 — Program that simulates rolling dice — 10/13
- Lecture 20 — Using the Random class to generate unpredictable values — 10/10
Program that uses a Random object to generate unpredictable sequences — 10/10 - Lecture 18 — &&, || and ! logical operators, and the
.equalsmethods for Strings — 10/6
MUFrame.java program showing nested if examples for NCAA Tournament selection — 10/6
MUPanel.java for this example program — 10/6 - Lecture 17 — Lecture Notes about Comparison Operators and Logical Operators — 10/3
- Lecture 16 — More Operators in Java: += -= *= /= %= ++ and -- — 10/1
TVSet.java class definition — 10/1
- Lecture 15 — BankAccount.java class definition — 9/29
MUPanel.java that uses BankAccount objects — 9/29 - Lecture 12 — TVSet.java class definition — 9/22
MUPanel.java that uses TVSet objects — 9/22 - Lecture 11 — Structure of all setter and all getter methods — 9/19
BaseballHitter.java class definition — 9/19
MUPanel.java that uses BaseballHitter objects — 9/19 - Lecture 10 — Lecture Notes about typical methods in a class — 9/17
- Lecture 9 — Lecture Notes about Data Types, Operators and Methods — 9/15
MUPanel.java developed in class — 9/15 - Lecture 8 — Lecture Notes about Kinds of Methods and Data Types — 9/12
- Lecture 7 — How to enter different data type values in Java statements — 9/10
SmileySun.java class with size property — 9/10
MUPanel for new SmileySun class — 9/10 - Lecture 5 — Structure of all Class Definitions — 9/5
LollipopTree.java class definition — 9/5
SmileySun.java class definition — 9/5
MUPanel.java that uses tree and sun objects — 9/5 - Lecture 4 — Methods of the Graphics class explained — 9/3
- Lecture 3 — modified Flag.java class definition (modified to draw a vertical stripe) — 8/29
MUPanel.java that draws flags and names the country — 8/29
Gallery of the Flags of the World web site — 8/29 - Lecture 1 — Introduction to Java Programming & Objects — 8/25