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