Comp Sci Finals

Beschreibung

compsci
UdaraJay
Karteikarten von UdaraJay, aktualisiert more than 1 year ago
UdaraJay
Erstellt von UdaraJay vor fast 9 Jahre
5
0

Zusammenfassung der Ressource

Frage Antworten
Class Describes objects with the same behaviour
Object oriented programming Where tasks are solved by collaborating objects
Hashable Means that the could be equated in a
Immutable An object whose state cannot be modified once it's created. trupuls are immutable eg. Opposite = mutable.
Hashable Objects which are considered washable should be equal in the sense that they have the same hash value.
Public interface of a class The set of all methods provided by a class along with their description
Encapsulation When the implementation details of a public class are hidden. This is usually done for programs which are being developed over a long period of time and you don't necessarily care about how each method is implemented - and encapsulation is used to make the object more capable USERS DON'T get direct access to any of the instance variables.
Accessor methods are getters
Mutator methods are setters
Instance variables Objects store their data in instance variables. An instance of the class is an object of that class. Instance variables are part of the implementation that should be hidden from the user. Although python does not enforces this the underscore before the variable indicates that it should not be directly accessed.
Unit testing this is the process of testing in isolation - outside the complete program
Method headers method headers and method comments are used to specify the public interface of a class.
Mutator method changes the object on which it operates - can be a accessor (getter - does not change the object it operate on) or a mutator (setter)
Data representation for each accessor method the the object must either store or compute the results.
Constructor initializes the objects instance variables - invoked when an object is created, uses the special method __init__(). self. is used to access the instance variables
Object tracing used to visualize object behaviour.
Special method to use a standard method with an object, define that special method. __repr__() is used to create the sting representation of an object
Throw early when a method detects a problem it is better to throw an error early than trying to make an imperfect fix.
Try, except and finally are the main ways to handle errors. -
Exceptions All errors finally lead unto an exceptions, exceptions can be split to: Warning & Standard Errors
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

110 Revision
Luke Ericcson
Java
Lulu__
BWL-Theorie (Allgemeines)
Julian 1108
Neurobiologie Übersicht
Laura Overhoff
Wortschatz Französisch 3. Gesundheit und Medizin
l_u_n_a_19
La mondialisation - Vocab
Gaelle Bourgeois
Vetie - Pathologie 2016
Fioras Hu
Vetie Pharma 2015
Anna Auferkamp
Meth: QUANTI
max knoll
Vetie - Berufsrecht 2016
Kim Langner
Vetie: Geflügelkrankheiten 2020 (Matrikel 2015)
Ro F