Flashcards in Chapter 1 Deck (20)
giving a value to a variable on constant
item of data that can be changed throughout the lifetime of a program
item of data that cannot be changed throughout the lifetime of a program
What is a local variable?
a variable wthat's scope is only within a certain subroutine
What are the benefits of subroutines?
code reuse, easier to design
What are the various types available in most languages?
integer, float, string, Boolean, list/array
what is the difference between a list and an array?
An array is fixed in size(static) and a list is dynamic
when would you use a while loop and when would you use a for loop?
while loop when you are not sure how long it will repeat (indefinite iteration) and a for loop is sued when you know how many (definite iteration)
what is 14%5
what is concatenation
the operation of merging 2 stings into one string
What is the difference between a procedure and a function
a procedure carries out a sequence on instructions and doesn't return anything, where as a ffunction must return a valie
what is a parameter
data passed into a subroutine
there are two types of subroutine - what are they
function and procedure
A2: what is encapsultaion
the concept of putting properties and methods in one object
A2: what is a method
a routine within an object
A2: What is a class
a blueprint that definies the properties and methods of similar objects
A2: what is an object?
A specific instance of a class
A2: what is inheritance?
using a class to share the porperties and methods wwith a subclass
A2: what is polymorphism
havin the same method name with different arguments