Fundamentals of Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Iteration

A

Repetition

Definite iteration - set number of times

Indefinite iteration - repeats until certain condition is met

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Truncating

A

The process of cutting off a number after a certain number of characters or decimal places

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Procedure/Subprogram/Routine

A

Another word for Subroutine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Parameter

A

A parameter works like a variable in that it identifies the data that you want a subroutine to take in and use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Argument

A

The argument is the actual value being passed to the subroutine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Procedural Programming Language

A

Languages where the programmer specifies the steps that must be carried out in order to achieve a result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Imperative Programming Language

A

Languages based on giving the computer commands or procedures to follow. (A single algorithm, similar to step by step)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Hierarchy Chart

A

A diagram that shows the design of a system from the top down.

https://a325ff60-a-ba81db26-s-sites.googlegroups.com/a/campioncollege.com/it_eveningschoool/hierarchy-chart/chart.jpg?attachauth=ANoY7cpoxmzJ98YOBdAnkYTsW4iImY5ldYqCrRbGMpLsPoiMMRwuvA_pn3N5pKYqO_qk1KLIXsxfBYOl9plKDO8tRhmkj26bFL41Ld5OBv0J1931o89RFcjMKfczrIR8SJg-vsdH0EJK4zHTC_ZFMW9qA11CDnKdffMf7oXk1WCJhze8dxeAeEbN7QH5yoO-6i58ZOC_P_iHFzeBDy2JjVsukxd_GmYZQMQLTh5C7vgVFRu0ypYjotSuqQezph9fSEdxfxlit6_Q&attredirects=0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Structure Chart

A

Similar to Hierarchy with the addition of showing how data are passed around the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Structured Programming

A

Programming paradigm aimed at improving the clarity, quality and development time of a computer program by making extensive use of the structured control flow constructs of selection (if/then/else) and repetition (while and for), block structures, and subroutines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Object-Oriented Programming (OOP)

A

Is a programming paradigm based on the concept of “objects”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Attributes

A

Similar to Variables

Eg in Python

class Person: #set attributes
     def \_\_init\_\_ (self, age): #put the attributes you want to adjust here
         self.first_name = "John"
         self.last_name = "Smith"
         self.age = age

An underscore in front of the attribute (eg self._age = age) makes it a private attribute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Methods

A

Similar to Functions

Eg in Python

class Person: #set attributes
     def \_\_init\_\_ (self, age): #put the attributes you want to adjust here
         self.first_name = "John"
         self.last_name = "Smith"
         self.age = age

__init__() is an existing method in the class Person.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Instantiation

A

The creation of objects from the class definition

Eg in Python

class Person: #set attributes
     def \_\_init\_\_ (self, age): #put the attributes you want to adjust here
         self.first_name = "John"
         self.last_name = "Smith"
         self.age = age
def main(): #to instantiate the object
     new_age = Person(25)  #need variable = class(value)
     print(new_age.age)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Class Diagram

A

http://pythonschool.net/oop/creating-your-first-class/

First Picture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Encapsulation

A

The process of combining data and functions into a single unit called class. The concept of encapsulation is to make data hiding possible.

17
Q

Inheritance

A

Inheritance provides a mechanism that allows us to build upon our existing work, for example, ensuring multiple people (from the example class) share similar characteristics and behaviours that they have in common. The relationship between classes benefitting from inheritance is similar to that of a parent and a child.

A child class inherits functionality from the parent class (including all attributes and methods the parent class has)

In addition, the child class can extend the functionality of the parent by adding attributed and methods unique to the child.

18
Q

Inheritance Diagram

A

http://pythonschool.net/oop/inheritance-and-polymorphism/

First Picture

19
Q

Polymorphism

A

In a child class, we can change how some methods work whilst keeping the same name. This is called polymorphism or overriding and is useful because we do not want to keep introducing new method names for functionality that is pretty similar in each class.

20
Q

Abstraction

A

Abstraction is a technique for hiding the complexity of computer systems. It works by establishing a level of simplicity on which a person interacts with the system, suppressing the more complex details below the current level.