click below
click below
Normal Size Small Size show me how
ENSC 26 Lesson 1-1
Introduction to Programming
| Term | Definition |
|---|---|
| algorithm | is a specific step-by-step solution to a particular problem. It can be a single line of code or combinations of lines. |
| 1.1. Natural Language 1.2. Pseudocode 1.3. Flowchart 1.4. Programming Language | Ways to Express Program Algorithms |
| Natural Language | Easiest way to express algorithms. |
| Pseudocode | Informal code that combines natural language and programming language. |
| Flowchart | is a graphical representation of an algorithm to define its logical flow. It illustrates the steps of an algorithm by using different kinds of boxes which are ordered by connecting them with arrows. |
| Programming Language | It is a high-level language that consists of rules for instructing a computer in performing tasks. Examples are BASIC, C, C++, Java, Visual Basic, etc. |
| computer program or program | is a series of instructions written to perform a specific task for a computer. It is a series of instructions that dictate the manner of execution of a computer. |
| programming languages | These computer programs are constructed using different ___ |
| 2.1. Machine Language 2.2. Assembly Language 2.3. High-level Language | different programming languages. |
| Machine Language | is the binary code that is used by the computer natively to perform operations. As a program, it is a set of instructions for a specific central processing unit, that is used to represent operations and data in a computer. |
| Assembly Language | It is an intermediate-level computer language that is specific to a computer architecture. It uses “English-like” abbreviations and hexadecimal values to make complex instructions easier to write. |
| assemblers | Assembly language is translated into machine language by another architecture specific translator programs called ___ |
| High-level Language | It is a computer language whose instructions or statements each correspond to several machine language instructions. Instructions look like almost daily English and contain commonly used mathematical notations which made programming significantly easier. |
| compilers and interpreters | High-level language is translated into machine language by translator programs called ___ and ___ |
| Compilers | are computer program that translates an entire set of instructions in high-level language into machine language (Merriam-Webster) |
| interpreter | executes each of a set of high-level instructions before going to the next instruction |
| COMPILER | -Spends lot of time analyzing and processing the program -Resulting executable is a form of machine-specific binary code -Computer hardware executes the resulting code -Program execution is fast |
| INTERPRETER | -Relatively little time spent in analyzing and processing the program -Resulting code is sort of intermediate code -Another program executes the resulting code -Program execution is relatively slow |
| Object-oriented Programming | is a software development architecture that uses the object which are code-based abstraction of a real-world entity or relationship. |
| abstraction, encapsulation, inheritance, and polymorphism | four main facets of OOP design/Features of Object-Oriented Programming |
| -simplifying complex systems -error localization -reusability | Advantages of Object-Oriented Programming |
| Abstraction | • Involves the facility to define objects that represent abstract "actors" that can perform work, report on and change their state, and “communicate" with other objects in the system. |
| Abstraction | • Basically allows roles and interaction which greatly simplify programming approach. |
| Encapsulation | It means information hiding |
| Encapsulation | It is concealing the actual implementation/methods used by the object by using a public interface that determines what is visible to the application outside the class. |
| Uses of encapsulation: | i. Enables attribute and method protection against external interference. ii. Facilitates validation code inclusion to catch public interface errors. iii. Relieves users from concerning themselves with implementation details of properties and methods. |
| Inheritance | -Deriving a child class from a parent class. • Child class inherits, can modify, add, or subtract from parent class. • Enables code reuse for programmers. |
| Polymorphism | It means treating one object as another or treating an object of one class as if it were from a parent class. |
| class | is an abstraction of a real-world concept through a source code. |
| source code | object DNA |
| instance | ___of an object is the actual object that you use in your program. |
| instances | are resultant inmemory use of a class as an object. |
| Object Attributes | These are pieces of data that describe the object. It can be called properties or qualities. Examples are color, name, size, etc. |
| Object Methods | These defines the things that the object can do or can be done to it. Examples are click, hide, show, etc. |
| Visual BASIC | is a high-level, object-oriented programming language which evolved from the earlier DOS version called BASIC (Beginners' All-purpose Symbolic Instruction Code). |
| Visual Studio IDE | is a creative launching pad that you can use for many aspects of software development - editing, debugging, building code, and then publishing an app. |
| project | is a collection or a group of related source files which can then be compiled to create an executable file or a program component. |
| solution | is simply a container for one or more related projects, along with build information, Visual Studio window settings, and any miscellaneous files that are not associated with a particular project. |
| designer | is a visual surface onto which you can add controls such as buttons and lists. |
| primary form | where different objects can be added |
| solution explorer | also serves as a window for browsing between forms and modules in a project and navigating all items in your solution |
| The Form | the primary element of your program’s interface. It serves as a container that allows other objects (or controls) to be inserted. |
| The Toolbox Window | displays icons for controls and other items that can be added to the Visual Studio project. It only displays items appropriate to the type of file you are working on, i.e. it is deactivated when you are in the code editor view. |
| The Properties Window | allows the user to view and change the design-time properties and events of selected objects located in editors and designers you accidentally close this window, simply press F4 to restore it. |
| The Solution Explorer | located on the upper-right side of the user-interface by default, it manages the files in the project. |
| The Error List Window | displays information about a specific error message |
| The Code Editor Window | where you can edit code or design a user interface such as a window with buttons and text boxes |
| Object Methods | Operations that an object can either perform, or have performed on it |
| Machine Language | type of programming language that are numeric codes for the operations that a particular computer can execute directly. |
| Algorithms | Abstraction of a computer program which consists of instructions in producing a set of outputs from a set of inputs. |
| compiler | Translator programs that convert high-level language instructions back to machine code. |
| inheritance | Feature of object-oriented programming which allows programmers to share codes. |