Karteikarten
Program structure
Karten in diesem Stapel (20)
- 1What is an Algorithm?Is a set of rules/steps that represent the solution to a problem
Given any task, we can break it down into steps, which makes solving the problem a lot easier
Used to help create solutions when a program is required
Get represents the input of data
Put represents Output - 2What is the syntax?The rules of how statements should be structured
In a programming language, syntax rules specify how commands should be used to create statements - 3What is a variable?It is the named location in the compters memory which's used to hold a data value whilst the program is running
- 4What is a Data Type?description of the kind of data which is stored in a variable
e.g. Numeric, Character, String, Boolean and Date - 5What is a sequence? (Fundamental Programming concepts)A series of instructions in a program is performed in the order that it is listed in.
Can contain any number of actions and none can be omitted. - 6What is the selection?An act will be executed only if a condition is met
- 7What is a condition?Describes a particular relationship between a pair of variables
The value of a condition is true if the relationship holds for the current variable
Logical operators: AND, OR and NOT - 8What is an IF-THEN statement?If a condition is true the statement following then will be executed
- 9What is an IF-THEN-ELSE statement?The program provides alternate statements to be executed if the initial condition is false
- 10What is an END-IF statement?If the if statement is true the program will stop running
- 11What is repetition? (iteration)Achieved through the use of loops and can be count controlled or condition controlled
- 12What is a count controlled loop?Instructions inside the loop are executed a set number of times, the increment values are set, a loop counter is used
- 13What is a condition-controlled loop?A sequence of instructions is repeated while a condition is true.
Until-The loop is executed until a condition becomes TRUE with the condition being tested at the end of the loop
While-The loop is executed while a condition is TRUE with the condition being tested at the start of the loop - 14Explain the term objectAn object is a self-contained component that incorporated data and properties and functions/methods
- 15What is an Object-Oriented programAn Object orientated program is a collection of objects that can interact with other elements. An object is an element
- 16What is a class?It is a building block for OOP, class specifies the attributes and behaviours that relate to a real-world object.
A template that describes the details of an object e.g. car
A class is defined by its name, its data members and member functions e.g. methods - 17What is a method? (behaviours)Its a section of code contained in a class which defines an action that an object of that class can perform.
A class can have a number of methods
Methods can only have access to data in their class - 18What is inheritance?-A class can inherit the attributes and methods of an existing class
-Existing class is known as base/parent
-The new class is known as derived/child
-Inherited method can re-defined - 19Evaluate the object-oriented programming approach Advantages-Improved productivity due to code reusability-Faster development and lowers the overall cost
-An object can be used with little knowledge of how its implemented and objects can hide aspects from programmers so some code cant be altered
-Due to the modular nature of OOP it goes through extensive planning, this means better designs and fewer flaws
-OO approach can improve software quality as 1st class is tested in isolation then added - 20Evaluate the object-oriented programming approach Disadvantages-OO approach is not suited for all applications
-Concepts include inheritance etc. can be hard to understand: steep learning
-OOP can incur run time cost (more expensive)
-Not yet completely accepted by major vendors as they don't have the time to train staff in OOP
Informationen
- Beschreibung
- AS level AS Karteikarten am Program structure, erstellt von Abbie Welch am 18/11/2020.
- Erstellt von
- Abbie Welch
- Aufrufe
- 4
- Bewertung