High level programming Flashcards
___________ programming languages that provide a level of abstraction from the machine’s hardware.
They are designed to be easy for humans to understand and use, providing features like control structures, data types, and syntax that are more intuitive than low-level programming languages.
High-level languages
4 Characteristics of High-level languages
- Abstraction
- Ease of Use
- Probability
- Rich Libraries and Frameworks
High-level languages abstract away the details of the computer’s hardware. Programmers do not need to manage memory manually or deal with hardware-specific instructions.
Abstraction
They have syntax and constructs that are easier for humans to understand, write, and debug.
This makes programming more accessible and productive.
Ease of Use
High-level code can often be compiled or interpreted on different types of hardware with minimal modification.
This makes programs more portable across various platforms.
Portability
They come with extensive libraries and frameworks that simplify complex tasks and speed up development.
Rich Libraries and Frameworks
Examples of High-Level Languages
• Python
• Java
• C++
• JavaScript
• Ruby
Known for its readability and simplicity and it is used in web development, data science, artificial intelligence, and more.
Python
An object-oriented language used for building platform-independent applications, including web and mobile applications.
Java
An extension of the C language with object-oriented features, used for system/software development, game development, and performance-critical applications.
C++
Primarily used for web development to create interactive elements on websites.
JavaScript
Known for its elegant syntax, it is used in web development, particularly with the Ruby on Rails framework.
Ruby
Basic Concepts in High-Level Language Programming
- Syntax and Semantics
- Variables and Data Types
- Control Structures
- Functions and Procedures
- Object-Oriented Programming (OOP)
- Error Handling
- Input and Output
The set of rules that defines the structure of valid statements in the language.
Syntax
The meaning of those statements, or what the statements actually do when executed.
Semantics
Named storage locations in memory used to hold data that can be manipulated by the program.
Variables
Define the kind of data a variable can hold (e.g., integers, floats, strings).
Data Types
Allow the program to make decisions and execute code based on conditions (e.g., if, else, switch).
Conditional Statements
Execute a block of code repeatedly based on a condition (e.g., for, while, do-while).
Loops
Blocks of code designed to perform a specific task. They can take inputs (parameters) and return outputs.
Functions
Similar to functions but do not necessarily return a value. They perform actions or tasks.
Procedures
OOP languages use classes as blueprints to create objects, which are instances of classes. Classes encapsulate data (attributes) and methods (functions).
Classes and Objects
Allows a new class to inherit properties and behavior from an existing class.
o Polymorphism: Enables one interface to be used for a general class of actions.
Inheritance
Mechanisms for handling runtime errors in a controlled manner. It allow a program to respond to errors without crashing.
Exceptions
Captures data from users or external sources (e.g., keyboard input, file reading).
Input
Displays data to users or writes data to external sources (e.g., screen output, file writing).
Output
OOP languages use classes as blueprints to create objects, which are instances of classes. Classes encapsulate data (attributes) and methods (functions).
Classes and Objects
Allows a new class to inherit properties and behavior from an existing class.
Inheritance
Enables one interface to be used for a general class of actions.
Polymorphism
Source code is translated into machine code by a compiler before execution. Examples include C and C++. The compilation process checks for errors and produces an executable file.
Compiled Languages
Source code is executed line-by-line by an interpreter. Examples include Python and JavaScript. This reads and executes the code directly.
Interpreted Languages
A software application that provides comprehensive facilities for software development, including code editors, debugging tools, and build automation. Examples include Visual Studio, PyCharm, and Eclipse.
Integrated Development Environment (IDE):
Simpler tools for writing and editing code, such as Sublime Text or VS Code.
High-level programming languages enable developers to create complex software applications efficiently by providing user-friendly syntax and abstractions that simplify coding tasks. They form the basis for most modern software development.
Code Editors