O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

OOP

Ariana Parr Computer Science A level Inglês 15 flashcards

Flashcards do conjunto (15)

  1. 1What is a paradigm?A style or way of programming that can be used to solve a problem.
  2. 2What do procedural paradigms do?Tell the computer what to do step-by-step. They break a solution into subroutines, these are rebuilt and combined to form a program
  3. 3When do you use procedural?- the problem can be solved step by step
    - not much code to be re-used
    - the security is not high priority
    - little maintenance is required
    - little to no UI
  4. 4What is an object oriented paradigm?Paradigm that tell the program what to do based on objects which contain data in the form of attributes and code in the form of methods. The objects then interact with each other to form a solution
  5. 5When do you use object-oriented?- The problem can be used using objects from the real world and the objects can interact with each other
    - There is lots of code that can be reused throughout the program
    - you need the data to be protected
    -requires a lot of maintenace
    -there's a UI
    -there is user involvement
  6. 6What is a class?A template that will define what attributes and methods an object should have. Once it has been setup, it can then be reused to create several objects
  7. 7What will all classes have?class name, attributes, methods
  8. 8What is an object?When you create an instance of a class. Each object that is instantiated from the same class will share the same attributes and methods
  9. 9What is inheritance?When a sub class takes on the attributes and methods from a superclass or another class. It can also have its own extra attributes and methods or override existing ones.
  10. 10What are the three types of class?Super class -> Main class that all are derived from
    Parent -> inherit attributes from often the super class and will connect to the sub classes
    Child -> Will inherit attributes from a parent/super class
  11. 11What does overriding mean?When a method that has been inherited from a class is changed. When a method name is the same in a parent and sub class then the method in the parent/super class will be overridden
  12. 12What is encapsulation?Protects attributes of an object by making them private so that they can't be accessed or altered accidentally by other objects. This will therefore reduce errors. Attributes can only be changed by its methods. This means that attributes are changed in a way in which they are intended.
  13. 13What is polymorphism?Used when methods behave differently according to the context in which they are used
  14. 14What is a message?A means of passing control over to a different object. These will be setter or getter messages
  15. 15What are the benefits of OOP?* Code reasuability - classes created in one program can easily be saved in a library and reused in other programs/ faster code dev
    * encapsulation reduces code complexity
    * easier to modify and maintain

Informações

Descrição
A level Computer Science FlashCards sobre OOP, criado por Ariana Parr em 30-11-2021.
Criado por
Ariana Parr
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?