





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The different types of relationships and associations in Object-Oriented Programming (OOP). It defines association and multiplicity, and explains the different types of associations such as aggregation, composition, and dependency. The document also provides examples of methods used in OOP such as CompareTo, Contains, EndsWith, IndexOf, isEmpty, and lastIndexof. useful for students studying OOP and programming concepts.
Typology: Lecture notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Relationships
o - symbol for a whole/larger object o An object can be part of one or more classes.
CompareTo - compares two strings lexicographically Contains - used to check whether the specific set of characters are part of the given string or not ; returns a boolean
isEmpty - checks whether a string is empty or not; result in boolean lastIndexof - returns the position of the last occurrence of specified character(s) in a string
replace - replaces every occurrence of a given character with a new character and returns a new string split - used for splitting a String into its substrings based on the given delimiter or regular expression StartsWith - used for checking prefix of a String; returns a boolean Substring - a subset of another string. In case of substring startIndex is inclusive and endIndex is exclusive.