Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Comp Sci Finals

Beschreibung

compsci
UdaraJay
Karteikarten von UdaraJay, aktualisiert more than 1 year ago
UdaraJay
Erstellt von UdaraJay vor etwa 9 Jahre
5
0
1 2 3 4 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

0 Kommentare

There are no comments, be the first and leave one below:

ähnlicher Inhalt

Java
Lulu__
Deutsch Einstufungstest Niveau A1.2
SprachschuleAktiv
IKA-Theoriefragen Serie 03 (15 Fragen)
IKA ON ICT GmbH
BKF C95 (Fragen der Ziffern 3a - 3g)
Harald Koenig
Grundlagenwissen DaZ
p s
Differenzialrechnung (Analysis) Zusammenfassung
Antonia C
FOST 4 - Inferenzstatistik 2 und qualitative Methoden
Kathy H
Vetie - MiBi 2013
Fioras Hu
Vetie Immunologie
Anne Heyne
Vetie Radiologie VL-Fragen
Carolina Heide