SSD

Cards (26)

  • Object - An object is an instance of a class. An object will contain all the attributes, properties and methods of the class it is created from. Many objects can be created from the same class.
  • Constructor - A type of method within a class which is executed when an instance of the class is created.
  • Encapsulation - the process of defining a class by concealing its internal members from outside the class. The only way to access these internal members is by using public methods
  • Virtual method - A method with with an implementation that can be overridden by the sub class
  • Exceptions -
    IO
    OutOfRange
    Format
    DivideByZero
    Arithmetic
  • Instantiation - the creation of an object.
  • Sub class
    A class which inherits the visible properties, methods and events of the base class and can be customised with additional properties, methods, and extends.
  • Polymorphism
    allows sub class methods to be invoked through a base class reference during run-time. This is enabled through late binding
  • Late Binding
    The connection by a polymorphic base object to an overriding method during runtime
  • Public
    visibility, allows access by all classes
  • Static
    single instance ,use class name to access
  • An object is an instance of a class that can perform a set of related activities that define its behaviour. Abstract classes cannot be instantiated. An abstract class can only be used as a base class for other classes that extend it. A class can inherit from one abstract class(es) and must override all its methods that are declared to be abstract methods. Polymorphism at run-time is a primary concept of object-oriented programming which is enabled through late binding.
  • Advantages of methods
    Facility of overloading and overriding
    Reuse of code
    Simplified testing
  • Overloading

    Methods with the same name but different signatures, return types may differ
  • Interface
    fully abstract class, it can only contain abstract methods and properties. To use an interface method, the interface must be implemented using the : in the heading of a class after the class name
  • Abstract class
    cannot be instantiated, it has to be used via inheritance, it is often used as a base class and can include both abstract and non-abstract methods and properties
  • Bubble sort

    A bubble sort is a sorting method that compares adjacent elements in an array. It then swaps them if the are not in order. This process continues until the in of the array swapping the element when needed. This called a pass. Once the first pass is completed, it will be repeated until all elements are in the correct order.
  • selection sort
    A selection sort locates the largest number in an array and moves it to the end of the array, this becomes the sorted section of the array. This process is called a pass. Once the first pass is completed it then repeats this process adding the next item to the start of the sorted section of the array.
  • insertion sort
    An insertion sort takes the first element and makes this the sorted section of the array. It then takes the first element of the unsorted list and compares it to the elements in the sorted section, inserting into the correct position. This process is called a pass. Once the first pass is completed it then repeats this process adding the next item to the start of the sorted section of the array.
  • Base class
    A base class is a pre-existing class from which all other classes and properties are derived
  • Private
    This only gives access to the method from within the class/struct that it is inside.
  • Inheritance
    the ability to create a class that inherits attributes and behaviours from an existing class. The newly created class is the sub class and the existing class is the base class
  • Overriding
    Allows you to change the behaviour of a method defined in a base class. An override method must have the same signature as the overridden base method.
  • populating a already defined string array
    string [ ] ArrayName = {"JAN", "FEB"};
  • Creating an array (int)

    int[] ArrayName = new int[15]
  • Advantages of Incomparable
    implements an interface
    to allow comparison of two objects
    return type is integer-0 if same, -ve if smaller,+ve if greater