Join Barron Stone for an in-depth discussion in this video Custom objects, part of Programming Foundations: Real-World Examples.
- Out of the box, object-oriented programming languages…give us the ability to create objects…for common types of things…like representing numbers and strings.…But if I want to create my own custom types of objects,…I can do so by defining classes…which are the blueprints used to create new objects.…A class defines the attributes and methods…that make up a specific type of object.…This class for a pair of blue jeans…would describe its attributes…for waist size, length, and color…as well as methods for donning and removing the jeans.…This blueprint might also have a special constructor method…for creating a new pair of jeans object…which allows me to specify values for size, length and color…when I create a new jeans object.…
If I wanted to construct a new pair of jeans,…I could do so by following these blueprints…to give the new jean object the appropriate attributes.…But I'm not that good at sewing.…As a modern man,…I buy my pants on the internet.…This online order page is like the constructor method.…It has input parameters for the waist size, length and color…
- Reusing functions
- Local vs. global variables
- Creating and naming custom objects
- Class inheritance
- Modules and packages
- Multidimensional lists and tuples
- Queues and stacks
- Creating and combining sets
- Storing data in dictionaries
- If/else and switch statements
- For vs. while loops
- Error handling
- Polling and event-driven programming
Skill Level Beginner
Programming Foundations: Design Patternswith Elisabeth Robson2h 19m Intermediate
3. Class Inheritance
4. Modules and Packages
5. Lists and Tuples
6. Queues and Stacks
9. Conditional Execution
11. Error Handling
12. Polling and Event-Driven Programming
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.