Chapter 1 Flashcards
(20 cards)
What are Algorithms?
Step-by-step instructions to solving a problem.
Why are Algorithms important?
They help computers:-
- solve problems quickly & correctly.
- use less time & memory.
- work better, even with a lot of data.
What are Data Structures?
They are like a template or design for how data should be set up and handled.
What are NP Hard problems?
Not possible to solve problems.
What are examples of NP Hard problems?
1 - Tic-tac-toe.
2 - Google Maps.
3 - Chess.
What is the difference between Data Structures and Databases?
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)
What are the different Types of Programming languages?
1 - Assembly. (Low-level language, Ex. Machines…)
2 - High-Level Languages. (Works on any computer architecture)
What are the types of High-Level Languages? (1)
1 - Procedural :-
- Based on calling “Procedures” Which are sets of predefined steps. (Ex. C, Pascal, Fortran)
What are the types of High-Level Languages? (2)
2 - Declarative :-
- Based on expressing the “logic” of the code rather than expressing the algorithm to execute it. (Ex. SQL, HTML, Configuration Management)
What category of languages falls under Declarative (2) programming?
2.1 - Functional :-
Based on solving “Mathematical Functions” rather than using repetitions and control statements. (Ex. Lisp, Erlang, Haskell)
What are the types of High-Level Languages? (3)
3 - Object Oriented :-
- Based on grouping code into “Objects” of defined “Classes” which includes sets of attributes and methods. (Ex. C++, Java)
Java is pure Object Oriented, while C++ is flexible, it can be a mix of Procedural & Object Oriented. (True or False)
True.
What are the benefits of Object Oriented Programming?
1 - Encourages Code Reusability.
2 - Real World Modeling.
3 - Easier to trace Errors.
What is an IDE (Integrated Development Environment) ?
A software tool that provides a full package (Compiler, Text Editor and Debugging Tools) & Allows creation, repeated execution, and modification of a program.
What are the main steps of Software Engineering?
1 - Definition of Problem.
2 - Design Scheme.
3 - Coding Modules.
4 - Testing.
5 - Assemble Modules.
6 - Test until everything works correctly.
What techniques are used in Structured Programming?
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)
What are the Four Pillars of OOP (Object Oriented Programming) ?
1 - Encapsulation.
2 - Abstraction.
3 - Inheritance.
4 - Polymorphism.
What are the advantages of C++?
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).
What are the disadvantages of C++?
Disadvantages :-
1 - Hard to get good programmers.
2 - Needs careful, time consuming, coding to avoid errors.
What are the advantages of Java? and its disadvantages?
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.