Chapter 1 Flashcards

(20 cards)

1
Q

What are Algorithms?

A

Step-by-step instructions to solving a problem.

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

Why are Algorithms important?

A

They help computers:-
- solve problems quickly & correctly.
- use less time & memory.
- work better, even with a lot of data.

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

What are Data Structures?

A

They are like a template or design for how data should be set up and handled.

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

What are NP Hard problems?

A

Not possible to solve problems.

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

What are examples of NP Hard problems?

A

1 - Tic-tac-toe.
2 - Google Maps.
3 - Chess.

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

What is the difference between Data Structures and Databases?

A

1 - Data Structures : lives on the RAM and its gone when the program is closed. (Temporary)
2 - Databases : stored on the storage disk, doesn’t get erased when the program or computer is closed. (Permanent)

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

What are the different Types of Programming languages?

A

1 - Assembly. (Low-level language, Ex. Machines…)
2 - High-Level Languages. (Works on any computer architecture)

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

What are the types of High-Level Languages? (1)

A

1 - Procedural :-
- Based on calling “Procedures” Which are sets of predefined steps. (Ex. C, Pascal, Fortran)

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

What are the types of High-Level Languages? (2)

A

2 - Declarative :-
- Based on expressing the “logic” of the code rather than expressing the algorithm to execute it. (Ex. SQL, HTML, Configuration Management)

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

What category of languages falls under Declarative (2) programming?

A

2.1 - Functional :-
Based on solving “Mathematical Functions” rather than using repetitions and control statements. (Ex. Lisp, Erlang, Haskell)

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

What are the types of High-Level Languages? (3)

A

3 - Object Oriented :-
- Based on grouping code into “Objects” of defined “Classes” which includes sets of attributes and methods. (Ex. C++, Java)

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

Java is pure Object Oriented, while C++ is flexible, it can be a mix of Procedural & Object Oriented. (True or False)

A

True.

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

What are the benefits of Object Oriented Programming?

A

1 - Encourages Code Reusability.
2 - Real World Modeling.
3 - Easier to trace Errors.

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

What is an IDE (Integrated Development Environment) ?

A

A software tool that provides a full package (Compiler, Text Editor and Debugging Tools) & Allows creation, repeated execution, and modification of a program.

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

What are the main steps of Software Engineering?

A

1 - Definition of Problem.
2 - Design Scheme.
3 - Coding Modules.
4 - Testing.
5 - Assemble Modules.
6 - Test until everything works correctly.

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

What techniques are used in Structured Programming?

A

1 - Top-Down Design. (Define all tasks of the program)
2 - Separating & developing Tasks and Functions. (Can be designed separately)
2.1 - Library. (code used from a library)
2.2 - Programmer-Defined. (code programmer writes)

17
Q

What are the Four Pillars of OOP (Object Oriented Programming) ?

A

1 - Encapsulation.
2 - Abstraction.
3 - Inheritance.
4 - Polymorphism.

18
Q

What are the advantages of C++?

A

Advantages (Gives you more control over your code) :-
1 - Better speeds. (If coded correctly).
2 - Multi-inheritance allowed.
3 - Memory Management allowed, leading to less Memory consumption. (If coded correctly).
4 - Needed to maintain old legacy systems.
5 - Good for embedded systems with strict memory/processing limits. (Arduino).
6 - Good for critical systems needing high performance. (e.g., stock software, nuclear plants, railway systems).

19
Q

What are the disadvantages of C++?

A

Disadvantages :-
1 - Hard to get good programmers.
2 - Needs careful, time consuming, coding to avoid errors.

20
Q

What are the advantages of Java? and its disadvantages?

A

Advantages :-
1 - You can find many good programmers.
2 - You do not need to worry about Multi-inheritance problems or Memory management, so you can finish coding faster.
3- Good for most everyday software that do not require ultra fast performance or restricted to limited memory.

Disadvantages :-
1 - Slower speeds.
2 - Multi-inheritance not allowed.
3 - Memory Management not allowed, leading to more Memory consumption.