Fundamentals of Programming Flashcards
Iteration
Repetition
Definite iteration - set number of times
Indefinite iteration - repeats until certain condition is met
Truncating
The process of cutting off a number after a certain number of characters or decimal places
Procedure/Subprogram/Routine
Another word for Subroutine
Parameter
A parameter works like a variable in that it identifies the data that you want a subroutine to take in and use.
Argument
The argument is the actual value being passed to the subroutine.
Procedural Programming Language
Languages where the programmer specifies the steps that must be carried out in order to achieve a result.
Imperative Programming Language
Languages based on giving the computer commands or procedures to follow. (A single algorithm, similar to step by step)
Hierarchy Chart
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
Structure Chart
Similar to Hierarchy with the addition of showing how data are passed around the system.
Structured Programming
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.
Object-Oriented Programming (OOP)
Is a programming paradigm based on the concept of “objects”
Attributes
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.
Methods
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.
Instantiation
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)
Class Diagram
http://pythonschool.net/oop/creating-your-first-class/
First Picture