(1) Fundamentals of Programming Flashcards
What is a programming paradigm?
It refers to different styles of programming
Eg OOP, Procedural
What is the difference between a variable and a constant?
Variable - The value of the data item can change during the program’s execution
Constant - The value of the data item cannot change during the program’s execution
What are the characteristics of procedural programming paradigms?
A program that consists of step by step instructions
What are the characteristics of object orientated programming paradigms?
A program that consists of objects within classes and each object has its own data
Why is it good practice to have local variables?
- Decreases the complexity of the code
- Reduces the chance of accidently changing the variable value later in the code
What are the advantages of the structured approach?
-Easier to debug
-Easier to maintain
-Allows teams to work simultaneously
-Saves time
Reduces bugs
What is the structured approach to program design and construction?
The process of taking a big problem and breaking it down into smaller problems
Why is object oriented paradigms used?
Used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects
What is a class?
A class defines methods and attribute fields that capture the common behaviours and characteristics of objects
What is an object in programming?
Objects based on a class are created using a constructor, implicit or explicit, and a reference to the object assigned to a reference variable of the class type
What is mod and div and the C# equivalent?
Div is how many times a number goes into it = /
Mod is the remainder from division = %
How do you create a list in c#?
List name = new List ();
How to create an array?
string[] name = new string[5];