Byte Size Chunks: Java Object-Oriented Programming & Design

A little treat with all you need to know about Object-Oriented Programming in Java
4.4 (4 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
82 students enrolled
$19
$20
5% off
Take This Course
  • Lectures 37
  • Length 7 hours
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 11/2015 English

Course Description

  • Prerequisites: Basic understanding of Java
  • Taught by a Stanford-educated, ex-Googler, husband-wife team
  • Please don't take this class if you have already signed up for our From 0 to 1: Learn Java Programming course (that includes a far longer and more in-depth version of this material)

This is a quick and handy course with exactly what you need to know (nothing more, nothing less!) about Object-Oriented programming in Java

Let’s parse that.

  • The course is quick and handy: It explains object-oriented programming in Java in just the right level of detail for you to put these to work today.
  • The course has exactly what you need - nothing more, nothing less. It starts from zero, builds up the design, then gives plenty of real-world examples, but crisply and quickly.
  • The course is also quirky. The examples are irreverent. Lots of little touches: repetition, zooming out so we remember the big picture, active learning with plenty of quizzes. There’s also a peppy soundtrack, and art - all shown by studies to improve cognition and recall.

What's covered:

  • The Object-Oriented Paradigm: Classes, Objects, Interfaces, Inheritance; how an OO mindset differs from a functional or imperative programming mindset;
  • Mechanics: the mechanics of OO - access modifiers, dynamic dispatch, abstract base classes v interfaces.
  • Principles: The underlying principles of OO: encapsulation, abstraction, polymorphism
  • Interfaces, abstract base classes and interface default methods
  • Packages and Jars: The plumbing is important to understand too.
  • Language Features: Serialisation; why the Cloneable interface sucks; exception handling; the immutability of Strings;
  • Types: the Object base class; the instanceof operator, primitive and object reference types; pass-by-value and pass-by-object-reference.

What are the requirements?

  • No pre-requisites, this class starts from basics :-)

What am I going to get from this course?

  • Understand Object-Oriented programming concepts at the level where you can have intelligent design conversations with an experienced software engineer
  • Understand the nuances of Java specific constructs in serialisation, exception-handling, cloning, the immutability of strings, primitive and object reference types
  • Understand class and interface design
  • Define, implement and instantiate objects
  • Create class hierarchies using inheritance
  • Apply and benefit from encapsulation, runtime polymorphism and interface-driven programming

What is the target audience?

  • Yep! Folks that are new to (or somewhat intimidated by) Object Oriented Programming
  • Yep! Experienced C programmers looking to make the leap from procedural/imperative to object-oriented programming

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: An Object-Oriented State of Mind
03:45
Before we start with the serious stuff, remember this - Objects, like puppies, are your best friends.
18:59

Object-oriented programming languages require you to think in terms of objects and classes. We formally introduce these concepts, as well as encapsulation, abstraction, inheritance and other basic tenets of OO programming. Next come instantiation, member variables and member functions (static and non-static), start with access modifiers (public, private, protected) and finish with constructors and finalizers.

06:47

Static member variables and static member functions are class-specific, not object-specific.

14:52

Member variables and functions can be marked public, private or protected - these keywords are called access modifiers, and they govern the access that derived class objects have to their corresponding base class objects.

Java Keyboards
1 question
11:57

A simple coding drill that demonstrates all that we've covered so far: defining classes,instantiation(creating objects), different member variables and different member functions, getters, setters, constructors and finalizers.

09:17

We continue our simple coding drill that demonstrates all that we've covered so far: defining classes,instantiation(creating objects), different member variables and different member functions, getters, setters, constructors and finalizers. In this bit, we focus on instantiating objects, and on static member data.

08:57

What does it really mean for a class to derive from another class? We examine the idea of inheritance using Shapes.

07:09

We continue with our exploration of inheritance and explore how derived class objects have a full version of the base class object within them. This is illustrated using a class hierarchy involving planes and fighter planes.

14:21

Runtime polymorphism is an important OO concept. If an object of type Rectangle holds a reference to derived class Square, will our shape behave like a Rectangle or a Square?

06:08

We explore the Object base class, which all Java reference types derive from.

14:19

We introduce Interfaces: a special type of classes that have only function signatures but no function implementations.

06:43

Abstract base classes and abstract functions are covered in this class. We also compare when it makes sense to use interfaces, and when abstract base classes are a better choice.

Interfaces
1 question
Interfaces and Abstract Base Class
1 question
Inheritance
1 question
15:36

Upcasting, downcasting and the instanceof operator. Upcasting is OK but be careful with downcasting!

11:15

Interface default methods are a new feature in Java, that allow us to go back and retro-fit new methods into old interfaces. Interface default methods involve adding implementations to interfaces, which might seem like cheating, but its all in a great cause: this prevents an explosion of the class hierarchy and maintains backward compatibility in code.

18:58

We've talked a lot about interfaces, now let's walk the talk with a nice little drill.

Classes and Objects
1 question
Section 2: Java Language Constructs: The Best Thing Since Sliced Bread
12:09
Stuff happens - that's life. And when stuff happens, exceptions get thrown. Let's understand how modern programming languages (including Java) deal with unexpected situations. The basic idea: a chain of responsibility, where somebody needs to stand up and be counted. Coding is a lot like life.
07:27

Strings never change. Unlike almost everything else in life, they are immutable. Let's see how.

10:27

When are two objects 'equal'? How are the == operator and .equals() different from each other?

16:07

Generics are a language feature that help Java maintain its tight rules on Type Safety, while also facilitating code re-use.

11:47

Decades ago, when Java first appeared, its incredibly handy collections were among its biggest attractions over C++; much has changed, but Java collections are still incredible. Lists, maps, sets, and standard ways to iterate over them.

09:48
We tie together the ideas of collections and generics - a cool feature that came to Java relatively late (after C++ and C#) but is so handy!
14:15

Java has a clever way to sort collections: using Comparator objects. (Aside: This clever technique combines the Strategy and the Command Design Pattern). We see how Comparators and Collections work together: nested classes (the classes inside classes) and types of nested classes (static and non-static classes which are also called anonymous inner or local classes).

09:45

We wrap up our exploration of inner classes with a look at Anonymous and local classes. Anonymous classes are used heavily in UI, while local classes are very infrequently used.

Generic Classes
1 question
Static and non-static nested classes
1 question
Classes and Objects
1 question
Static Nested Class
1 question
Section 3: A serious drill with lots of code:-)
11:21
Working with files can sometimes seem boring - filled with repetitive boilerplate code. But files can get a bit more interesting if we get why they are so handy and so ubiquitous.
14:45
We will be making a useful Java application in this drill using concept of files and classes. The Java application will download daily stock data from a stock exchange website and output an excel file of top movers and heavily traded stocks. The ability to create Excel spreadsheets is a big win: we will use the Apache POI library, which will also serve to show we can use code written by someone else packaged into something called a JAR file.
18:42
We will be making a useful Java application in this drill using concept of files and classes. The Java application will download daily stock data from a stock exchange website and output an excel file of top movers and heavily traded stocks. The ability to create Excel spreadsheets is a big win: we will use the Apache POI library, which will also serve to show we can use code written by someone else packaged into something called a JAR file.
10:40

We will be making a useful Java application in this drill using concept of files, classes, nested classes and comparator. The Java application will download daily stock data from a stock exchange website and output an excel file of top movers and heavily traded stocks.

17:01
We will be making a useful Java application in this drill using a java library (JAR) called POI created by open-source powerhouse called Apache. The JAR POI has a set of classes to work with excel. The Java application will download daily stock data from a stock exchange website and output an excel file of top movers and heavily traded stocks
16:25

We will be making a useful Java application in this drill using a java library (JAR) called POI created by open-source powerhouse called Apache. The JAR POI has a set of classes to work with excel. The Java application will download daily stock data from a stock exchange website and output an excel file of top movers and heavily traded stocks.

16:09
We will be making a useful Java application in this drill using a java library (JAR) called POI created by open-source powerhouse called Apache. The JAR POI has a set of classes to work with excel. The Java application will download daily stock data from a stock exchange website and output an excel file of top movers and heavily traded stocks
Files
1 question
Section 4: Packages and Jars
13:28

We will talk about packages and jars in this lecture. We will talk about what they mean, how they are useful and how jar files are smarter than zip files (Hint: self-awareness is the start of smartness. Another hint: Metadata)

Packages
07:04
04:23

A little drill where we see packages and jars in action

Section 5: Some Object-Oriented Design Principles
Design Principle #1: Rely on Interfaces, not Implementations
04:14
Design Principle #2: The Open/Closed Principle
05:31
Design Principle #3: The Principle of Least Knowledge
04:39
Design Principle #4,5: Dependency Inversion and the Hollywood Principle
05:46

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Loony Corn, A 4-person team;ex-Google; Stanford, IIM Ahmedabad, IIT

Loonycorn is us, Janani Ravi, Vitthal Srinivasan, Swetha Kolalapudi and Navdeep Singh. Between the four of us, we have studied at Stanford, IIM Ahmedabad, the IITs and have spent years (decades, actually) working in tech, in the Bay Area, New York, Singapore and Bangalore.

Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft

Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too

Swetha: Early Flipkart employee, IIM Ahmedabad and IIT Madras alum

Navdeep: longtime Flipkart employee too, and IIT Guwahati alum

We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!

We hope you will try our offerings, and think you'll like them :-)

Ready to start learning?
Take This Course