Karteikarten
10. Principles of Programming

Karten in diesem Stapel (20)
- 1key Terms- Programming Paradigms
- Procedural Programming
- Visual Programming
- Event-driven Programming
- Object-oriented Programming - 2What is a Programming Paradigm?General rules/structures
What code looks like & is for - 3What is Procedural Programming?'Imperative' languages
- Sequential
- Contain vars, selection, loops, funcs.
- Change state of program - 4What is said to be the state of a Program?The value of its vars
- 5What is Visual Programming?- Uses GUI over text
- Teaches logic
e.g. Scratch - 6What are the drawbacks to Visual ProgrammingInefficient ∵ commands are typed quicker
Bad for large problems ∵ limited screen space - 7What is Event-Driven Programming?Allows user interaction
- Sits in loop, waiting for user input
- Function (listener) runs when input is received - 8How does Event-Driven Programming work?- OS processes event like normal
- Event -> applications event queue
- Event processed & -> correct listener by event processor - 9What is an Event?Object or data structure
- 10What is the Event Processor?- Nested loop
- Uses selection to send event to right listener - 11What is an Object?Instance of Class
- 12What is a Class?Data structure made of:
- Attributes (variables)
- Methods (functions) - 13What is OOP (Object-Oriented Programming)?Using Objects to benefit code
Four pillars:
Encapsulation, Abstraction, Inheritance, Polymorphism - 14What are the benefits of OOP?- Groupable ∴ reduces complexity
- Reusable ∴ easily moveable to different program
- Good for GUIs - 15What is Encapsulation?- Group parts of related code
- Reduces complexity, increases reusability
- Allows methods to take fewer parameters
Makes interface of class consist. of Attributes and Methods - 16What is Abstraction?Code is hidden from inner methods
- Reduces complexity
- Use objects and methods, not knowing how class is implemented
- Lessens impact of change in class - 17What is Inheritance?Uses super and subclasses
- Superclass contains generic info
- Subclass contains specific info
- Subclass inherits generic info from Superclass - 18Inheritance Diagram

- 19What is Static Polymorphism?Generalising methods for use in different ways depending on the parameters passed
- 20What is Dynamic Polymorphism?Overriding the methods in a Super Class during the runtime
Informationen
- Beschreibung
- A Level Computer Science ((AS) Unit 1: Fundamentals of Computer Science ) Karteikarten am 10. Principles of Programming, erstellt von Scott Jones am 31/07/2019.
- Erstellt von
- Scott Jones
- Aufrufe
- 0
- Bewertung