Examples from Lectures for CSC 120
- Lecture 38 — MUFrame.java for program that processes arrays of Car objects — 4/20
Car.java class definition file for this program — 4/20 - Lecture 37 — Some useful methods in the Java
Math
class — 11/18
Math class reference page from W3Schools.com — 11/18
Demo Program that calculates the mean and std deviation of Integer samples — 11/18 - 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/4
Object Scope and thethis
keyword — 4/4
MUPanel.java for a program illustrating the use ofthis
to access class-level objects — 4/4
- Lecture 30 — Working with individual objects vs. working with arrays — 3/30
MUFrame.java for program that uses an array of Mouse objects — 3/30
MUPanel.java for this program — 3/30
Mouse.java class definition file for this program — 3/30 - Lecture 29 — How to Use Swing Components for a User Interface — 3/28
MUFrame.java that draws rows and columns of dots with spinners and sliders — 3/28
MUPanel.java for this program — 3/28 - Lecture 27 — Using a for loop to generate a series of values — 3/23
- Lecture 24 — Finding the total, average, maximum and minimum of a series of values entered by the user — 3/16
- Lecture 23 — Program that shows use of getText and setText with TextFields, TextAreas and Labels — 3/14
- Lecture 22 — Program that simulates rolling dice — 3/2
- 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 16 — TVSet.java class definition — 2/16
MUPanel.java that uses TVSet objects with Buttons — 2/16 - Lecture 15 — BankAccount.java class definition — 2/14
MUPanel.java that uses BankAccount objects — 2/14 - Lecture 12 — TVSet.java class definition — 2/7
MUPanel.java that uses TVSet objects — 2/7 - Lecture 11 — Structure of all setter and all getter methods — 2/4
BaseballHitter.java class definition — 2/4
MUPanel.java that uses BaseballHitter objects — 2/4 - Lecture 10 — Lecture Notes about typical methods in a class — 2/2
- Lecture 9 — Lecture Notes about Data Types, Operators and Methods — 1/31
MUPanel.java developed in class — 1/31 - Lecture 8 — Lecture Notes about Kinds of Methods and Data Types — 1/28
- Lecture 7 — How to enter different data type values in Java statements — 1/26
- Lecture 5 — Structure of all Class Definitions — 1/21
LollipopTree.java class definition — 1/21
SmileySun.java class definition — 1/21
MUPanel.java that uses tree and sun objects — 1/21 - Lecture 4 — Methods of the Graphics class explained — 1/19
- Lecture 3 — modified Flag.java class definition (modified to draw a vertical stripe) — 1/14
MUPanel.java that draws flags and names the country — 1/14 - Lecture 1 — Introduction to Java Programming & Objects — 1/10