Programming quickly and effectively is all about reusing code and keeping it as clean as possible. Inheritance is one function that helps eliminate the need to create completely new classes in object-oriented programming. What is inheritance? Think of inheritance in programming like making a clone. The new set will have everything the old set has, but with the option to add new information and functions. Learn how to set up and implement inheritance to cut down on your programming time.
- View Offline
This next idea of Inheritance is first a great form of code reuse.…We can create a new class, but instead of writing it from scratch, we can base…it on an existing class.…So let's say you start off by defining in your application a Person class with a…few attributes--name and address and phone number, and perhaps some simple…behavior in it--and then later on you figure out your application will need…another class, and this one called Customer.…But you realize as you are writing it that this new Customer class is…exactly the same as the Person class, and the only difference is it also has a customerNumber.…
Now, you didn't want to add that customer number to your Person class, because…we're trying to use abstraction.…We're trying to only focus on the essentials, and not all of your Person…objects will be customers.…Now, you could do this by creating a completely separate class, but in an…Object-Oriented language, a better way is that we'll create a new class called…Customer, and then we say we are going to inherit from the Person class.…
Let Simon Allardice introduce you to the terms—words like abstraction, inheritance, polymorphism, subclass—and guide you through defining your requirements and identifying use cases for your program. The course also covers creating conceptual models of your program with design patterns, class and sequence diagrams, and unified modeling language (UML) tools, and then shows how to convert the diagrams into code.
- Why use object-oriented design (OOD)?
- Pinpointing use cases, actors, and scenarios
- Identifying class responsibilities and relationships
- Creating class diagrams
- Using abstract classes
- Working with inheritance
- Creating advanced UML diagrams
- Understanding object-oriented design principles
Skill Level Intermediate
1. Core Concepts
2. Object-Oriented Analysis and Design
Defining requirements6m 9s
3. Utilizing Use Cases
4. Domain Modeling (Modeling the App)
5. Creating Classes
6. Inheritance and Composition
7. Advanced Concepts
8. Object-Oriented Design Patterns
9. Object-Oriented Design Principles
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.