Maury Hillstrom

Maury Hillstrom

Classes, Objects, and Methods

Slide Duration:

Table of Contents

Section 1: Java
Introduction to Java

31m 13s

Intro
0:00
What is Java?
0:12
Definition of Java
0:13
Writing a Java Program
3:48
Example: Converter IO Program
3:49
Example: Grade Program
8:00
Example: Writing a Java Program
12:13
Starting Point of All Java Code
14:00
'Public Static Void Main'
14:01
'Public Static Void Main' Syntax
16:07
Syntax
16:08
String
16:27
args
16:41
How to Add Comments
17:13
How to Add and Use Comments
17:14
Java Statements
17:59
Java Statements and Example
18:00
Example1: Text-printing Program
18:44
Example 2: Text-printing on Multiple Lines
20:12
Example 3: Addition Program that Displays the Sum of Two Numbers
21:11
Example 4: Program that Determines Calculations of Two Numbers
24:43
Example 5: Running Programs Through NetBeans IDE
25:50
Working with Java

31m 57s

Intro
0:00
History of Java
0:09
History of Java
0:10
Requirements of Java
2:35
Free to Download & Install
2:36
System's Path Environment Variable
4:40
Java's Two-Step Process
5:48
Create Source File
5:49
Compile Source File Into Bytecode
6:49
Java Application Creation
7:35
Two Main Ways to Create Java Application
7:36
Other Popular Java-compatible IDE
8:08
Importing Classes
8:45
Importing Classes, Example, and Syntax
8:46
Arithmetic Rules of Precedence
10:02
PEMDAS vs. P(MDR)(AD)(Java)
10:03
Four More Program Examples
13:22
Example: Circle Geometry
14:06
Example: Searching Through a Text String
19:50
Example: Doing a Find & Replace
23:35
Example: Calendar Functions
25:45
Classes, Objects, and Methods

29m 34s

Intro
0:00
Classes, Objects, and Methods
0:09
Class
0:10
Object
0:57
Attributes
1:14
Method
1:33
Arguments
1:48
Instance Variables
2:17
Instance Variables
2:18
Set and Get Methods
3:15
Set and Get Methods
3:16
Primitive Types vs. Reference Types
4:11
Primitive Types
4:12
Reference Type
6:56
Constructors
7:22
Attributes of Constructors
7:23
Example 1: Prints a Table of Squares and Cubes From 0 to 10
8:26
Example 2: Bank Account Class with Constructor
11:54
Example 3: Create and Change Account Object
14:14
Example 4: Bank Account Debit Function
18:44
Example 5: Debit Account Balance Program
20:08
Example 6: Hardware Store Inventory & Invoice
22:50
Example 7: Hardware Store Inventory & Invoice Main Class
26:05
If Logic

34m 20s

Intro
0:00
The Mighty 'If'
0:08
If Logic and If Statements
0:09
Conditional Statements in Java
1:44
If
1:45
If…Else
2:07
If…Else If….Else
2:33
Switch
3:15
Pseudocode
3:41
Pseudocode
3:42
Examples
4:05
Compound Assignment Operators
6:17
Compound Assignment Operators and Examples
6:18
Boolean Logical Operators
9:02
&& Operator
9:03
| | Operator
9:58
! Operator
11:38
Example 1: Program that Determines the Larger of Two Numbers
13:00
Example 2: Determine the Largest and Smallest Entry
15:55
Example 3: Determine if a Number is Odd or Even
19:24
Example 4: Determine if Three Values Could Form a Triangle
21:44
Example 5: Run Application for Triangle
24:23
Example 6: Basic If…Else Statement
25:11
Example 7: Basic If…Else If…Else Statement
26:52
Example 8: Catch Possibilities if User Enters Invalid Numbers
28:38
Example 9: Basic Switch Statement
31:10
Loops

37m

Intro
0:00
Types of Loops
0:07
For Loop
0:54
While Loop
1:15
Do…While Loop
1:39
Increment and Decrement Operators
2:26
Operators Overview
3:11
Pre-Increment
4:34
Pre-Decrement
5:35
Post-Increment
6:01
Post-Decrement
6:25
Counters vs. Sentinels
7:06
Counters
7:07
Sentinels
7:40
Break & Continue Statements
8:46
Break
8:47
Continue
9:29
While Loop Syntax
10:03
While Loop Syntax and Example
10:04
For Loop Syntax
11:54
For Loop Syntax and Example
11:55
Example 1: Calculate Commissions for Sales Staff
13:55
Example 2: Program Calculates Average Miles Per Gallon
18:56
Example 3: Find the Smallest of Entered Numbers
23:30
Example 4: Return the Lyrics to 'The 12 Days of Christmas'
27:37
Example 5: Do While Setup
31:50
Example 6: Break Loop Statement Example
34:21
Example 7: Continue Loop Statement Example
35:05
Modules

33m 56s

Intro
0:00
Types of Modules
0:09
Methods & Classes
0:10
Packages
0:28
Static Class Members
1:20
Static Class Members
1:21
Example of Static Class Members
1:51
Queues vs. Stacks
3:21
Queues
3:51
Stacks
5:06
Push and Pop
5:42
Method Overloading
6:05
Method Overloading
6:06
The 'this' Keyword
7:13
'this' Keyword
7:14
Example
7:28
Composition vs. Inheritance
8:05
Composition and Example
8:23
Inheritance and Example
9:33
Example 1: Roll a Six-diced Die 10,000 Times
10:53
Example 2: Program Calculates Charges for Parking Lot
14:47
Example 3: Test Application for Class Parking
20:30
Example 4: Program that Converts Fahrenheit to Celsius and Vice Versa
23:43
Example 5: Program Simulates Tossing a Coin
29:25
Arrays

34m 3s

Intro
0:00
What is an Array?
0:08
Attributes of Array
0:09
Types of Arrays
1:10
Single-Dimensional
1:18
Two-Dimensional
2:01
How to Declare an Array
3:15
Declaring an Array: Single Dimension
3:16
Declaring an Array: Two Dimension
4:12
The Enhanced 'for' Statement
5:02
'for' Statement
5:03
Passing Arrays to Methods
7:14
Pass by Value
7:34
Pass by Reference
7:54
Example 1: Simple Array
8:24
Example 2: Program Simulates Rolling Two Six-sided Dice 36,000 Times
9:54
Example 3: Application Roll Two Dice
14:49
Example 4: Program Totals Sales for Sales Staff and Products
17:24
Example 5: Application for Class Sales
21:08
Example 6: Card Class Represents a Playing Card
24:43
Example 7: Deck Class Represents a Deck of Playing Cards
26:36
Example 8: Card Shuffling and Dealing Application
30:35
Inheritance

28m 15s

Intro
0:00
Composition vs. Inheritance
0:07
Composition & Example
0:17
Inheritance & Example
1:16
Composition vs. Inheritance
2:04
Visual Diagram
2:05
Inheritance Class Structure
4:36
Parent Class
4:37
Child Class
4:51
Purpose of Inheritance
5:01
Method Overriding vs. Overloading
6:32
Method Overriding
6:39
Method Overloading
7:28
Inheritance Class Hierarchy
8:01
Inheritance Class Hierarchy
8:02
Protected Members
10:27
Public, Protected, and Private
10:28
Example 1: Basic Inheritance with Constructors
12:11
Example 2: Program Exhibits Both Composition and Inheritance
16:03
Example 3: Class Point Definition
21:07
Example 4: Class Quadrilateral Definition
22:15
Example 5: Class Trapezoid Definition
23:09
Example 6: Class Parallelogram Definition
24:05
Example 7: Class Rectangle Definition
24:37
Example 8: Class Square Definition
24:50
Example 9: Main Application for Shapes Exercise
25:42
Polymorphism

36m 53s

Intro
0:00
What is Polymorphism?
0:08
Definition of Polymorphism
0:09
Polymorphism in Programming
1:10
Superclass
1:11
Subclass
2:11
Variable
2:21
Method
2:31
Polymorphism in Programming
3:46
Superclass
3:47
Subclass
4:16
Variable
4:22
Method
4:31
Abstract Classes vs. Concrete Classes
6:31
Abstract Classes
6:32
Abstract Class Polymorphism Example
9:19
Abstract Superclass
9:20
Concrete Subclasses
9:58
'Final' Keyword for Superclass Methods
13:49
'Final' Keyword
13:50
Example
14:21
Example 1: Program to Demonstrate Basic Polymorphism
16:25
Example 2: Program to Demonstrate Polymorphism with Multiple Subclasses
18:35
Example 3: Program Tests Shape Hierarchy
25:12
Example 4: Definition of Class Shape
27:17
Example 5: Definition of Class Two Dimensional Shape
28:31
Example 6: Definition of Class Three Dimensional Shape
29:29
Example 7: Definition of Class Sphere
33:45
Exception Handling

22m 45s

Intro
0:00
What is Exception Handling?
0:09
Definition of Exception Handling
0:10
Why Account for Errors?
1:31
Why Account for Errors?
1:32
Common Types of Errors
3:51
User Caused
3:52
Programmer or System Caused
5:31
Using the 'Try… Catch' Process
7:30
Try
7:35
Catch
8:27
Try… Catch Syntax
8:51
Try… Catch Syntax
8:52
Uncaught Exceptions
9:44
Handling Uncaught Exceptions
9:45
Throw' Statement
11:03
Throw Statement
11:04
Throw Syntax
11:22
Example 1: Program to Catch Divide by Zero Error
11:41
Example 2: Program to Demonstrate Finally Keyword
16:18
Example 3: Superclass and Subclass Exceptions
19:20
Loading...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Java
Bookmark & Share Embed

Share this knowledge with your friends!

Copy & Paste this embed code into your website’s HTML

Please ensure that your website editor is in text mode when you paste the code.
(In Wordpress, the mode button is on the top right corner.)
  ×
  • - Allow users to view the embedded video in full-size.
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Related Services

Lecture Comments (21)

0 answers

Post by Michael Scott on November 3, 2015

How about having the Example codes available as a text file download? Much easier to offer this to students as a starting point so they can modify it.

0 answers

Post by Kitt Parker on July 10, 2015

I wish the code was available, I'd like to tinker with it.  I could copy it from the screen, but that takes too long.

1 answer

Last reply by: Kitt Parker
Fri Jul 10, 2015 12:11 PM

Post by John Bosco on July 3, 2013

Could you explain what all of the placeholders are in the example slides? For example: %S, %d, /n, and also %.2f

0 answers

Post by Phil Wyder on March 18, 2013

can a float or a double be negative? For example: -21.23234

0 answers

Post by JOSEPH PELLAM on March 18, 2013

I copied your code for the Squaresandcubes code but the following code for 1 thru 0:

System.out.printf("%d\t%d\t%d
"), x, (x * x), (x * x * x ));
x = 1;

Generates the following error for each line as follows:

C:\Users\jpellam.DEVELOPMENT\Documents\NetBeansProjects\squaresandcubes\src\squaresandcubes\Squaresandcubes.java:24: not a statement
System.out.printf("%d\t%d\t%d
"), x, (x * x), (x * x * x ));
C:\Users\jpellam.DEVELOPMENT\Documents\NetBeansProjects\squaresandcubes\src\squaresandcubes\Squaresandcubes.java:24: ';' expected

Not sure what I am missing. Thanks

0 answers

Post by Naeif Rafeh on March 6, 2013

I have problem from the Calendar class I have no idea why Ecleps did now recognized the Clendar Class
or did not import the Calendar class

0 answers

Post by Ovanes Mikaelian on January 4, 2013

After setting up the "public class accountcredit", which extension do we use to save the file - .class or .java? Thank you.

1 answer

Last reply by: Maury Hillstrom
Wed Nov 7, 2012 6:38 PM

Post by Keron John on November 7, 2012

I need to know where is the other class being called exactly in the code, I mean the precise lines in the code that are calling the other class, as I'm trying to do this and failing miserably.

3 answers

Last reply by: Annette Hoult
Sat Oct 27, 2012 6:33 PM

Post by Sergio Gutierrez on August 22, 2012

what is this Printf?? this drives me crazy!!

0 answers

Post by Jacob Mack on August 6, 2012

I apologize as I was able to get public class accounntcredit to compile. I guess most textbooks just use the capital letter naming convention.

0 answers

Post by Jacob Mack on August 6, 2012

Maury, I notice you do not capitalize like so:

public class AccountCredit. To have public class accountcredit from what I understand could cause a compile error, but I could be mistaken. Thank you for taking time out to clarify this. I really enjoy working watching and working on programming with your videos.

0 answers

Post by Tanaroek Thanaaphiwong on July 7, 2012

what happens if the number of each account becomes 0, even though they are written 500 or 100 on the page. does anyone know how to fix this problem

0 answers

Post by Matthew Lipman on October 19, 2011

Dear Hillstrom, seems u are smart by nature, easy to understand anything from you : )


i have a question, can you provide leasson for Java SWING!?


Thanks :)

2 answers

Last reply by: Mick Coyne
Wed Oct 10, 2012 10:09 PM

Post by Jethro Jones on February 27, 2011

I'd really like to have the sample code for these lessons so that I can follow along and tweak on my computer while I watch.

Classes, Objects, and Methods

  • Java uses Classes, Objects, and Methods in order to perform tasks
  • Classes contain the general information about the program, whereas Objects are specific instances of Classes.
  • Methods are sets of instructions that tell the classes and objects what to do
  • Java has a small set of Primitive Data Types which define basic data such as text and numbers
  • All data types can be used as declared variables
  • When an object is initialized for the first time, a Constructor is used to specify attributes

Classes, Objects, and Methods

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Classes, Objects, and Methods 0:09
    • Class
    • Object
    • Attributes
    • Method
    • Arguments
  • Instance Variables 2:17
    • Instance Variables
  • Set and Get Methods 3:15
    • Set and Get Methods
  • Primitive Types vs. Reference Types 4:11
    • Primitive Types
    • Reference Type
  • Constructors 7:22
    • Attributes of Constructors
  • Example 1: Prints a Table of Squares and Cubes From 0 to 10 8:26
  • Example 2: Bank Account Class with Constructor 11:54
  • Example 3: Create and Change Account Object 14:14
  • Example 4: Bank Account Debit Function 18:44
  • Example 5: Debit Account Balance Program 20:08
  • Example 6: Hardware Store Inventory & Invoice 22:50
  • Example 7: Hardware Store Inventory & Invoice Main Class 26:05
Educator®

Please sign in to participate in this lecture discussion.

Resetting Your Password?
OR

Start Learning Now

Our free lessons will get you started (Adobe Flash® required).
Get immediate access to our entire library.

Membership Overview

  • Available 24/7. Unlimited Access to Our Entire Library.
  • Search and jump to exactly what you want to learn.
  • *Ask questions and get answers from the community and our teachers!
  • Practice questions with step-by-step solutions.
  • Download lecture slides for taking notes.
  • Track your course viewing progress.
  • Accessible anytime, anywhere with our Android and iOS apps.