ENG 6 Lecture Notes - Lecture 16: Toyota Rav4, Regular Expression, Dollar Sign
Document Summary
Structures and objects: structures relate data of different types, objects also have functions related to the variable. How is an object oriented system structured: categorizations. Inheritance: objects belonging to a narrow class can inherit" properties from a more general parent class, you can create a child class that inherits some of the properties of the parent class and modifies others", example: cars. Make(toyota, chevrolet, bmw, etc. : financing options, warranty info, these properties are not shared with other makes. Model (camry, rav4, prius: properties that aren"t shared with other models of the same make, e. g. Use your engineering judgment to decide how to divide these. Ball example: inheritance: more specific class that simulates bouncing ball with inelastic collisions, add parameters that specify energy lost in each collision. Defines pattern that starts with jo, followed by letter h, then followed by letter n, and ends with any number of word characters (indicated by \w*)