c-reviewer 2.pdf
Document Details
Tags
Full Transcript
INTRODUCTION TO COMP. AND PROGRAMMING. LOW LEVEL Machine language - is the language understood by a computer. It is very difficult to understand, but it is the only thing that the computer can work with. All programs and programming languages eventually generate or run pr...
INTRODUCTION TO COMP. AND PROGRAMMING. LOW LEVEL Machine language - is the language understood by a computer. It is very difficult to understand, but it is the only thing that the computer can work with. All programs and programming languages eventually generate or run programs in machine language. Assembly language - uses a mnemonic to represent, e.g., each low-level machine instruction or opcode, each directive, typically also each architectural register, flag, etc. Some of the mnemonics may be built in and some user defined. Many operations require one or more operands in order to form a complete instruction. MIDDLE LEVEL Middle-level language is a computer language in which the instructions are created using symbols such as letters, digits and special characters. Assembly language is an example of middle-level language. In assembly language, we use predefined words called mnemonics. C programming language - is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games. HIGH LEVEL java - is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. Python - is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation JavaScript (JS) is a lightweight interpreted (or just-in-time compiled) programming language with first- class functions. c++ - is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs. Swift - is a high-level general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. Coding - is the act of translating the design into an actual program, written in some form of programming language. This is the step where you actually have to sit down at the computer and type! Programming- is then the task of describing your design to the computer: teaching it your way of solving the problem Data - In common usage and statistics, data is a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted formally Compilation- is actually the process of turning the program written in some programming language into the instructions made up of 0's and 1's that the computer can actually follow. Debugging- is simply the task of looking at the original program, identifying the mistakes, correcting the code and recompiling it. Code - The instructions in a computer program. Instructions written by a programmer in a programming language are often called source code. Key words - are predefined reserved identifiers that have special meanings. They cannot be used as identifiers in your program. Identifiers - composed of a sequence of letters, digits, and the special character Data Type - Defines as the set of values that a variable can store along with a set of operations that can be performed on that variable. VARIABLES- identifiers that can store value that can be changed and can store literals or some type of structured data. Constant -are expressions with a fixed value. It is identifiers that can store values that cannot be changed. Usually TYPES OF ERROR Clerical error – Ex. Assigning the same statement number to two instructions Logical error – ex. Omitting certain facts important to the whole system in a payroll application. Decision table – presents a complex situation, the conditions and the corresponding actions. Flowchart – shows the sequence of operations. Java’s uses – Android apps, Desktop apps, Web apps, Big Data. Python’s uses – Web apps, Machine learning, Data science, Artificial Intelligence, Cyber security. JavaScript – Web Dev & Apps, Server Apps, Web servers, Mobile applications. C++ uses – Game, Operating system, Database, Embedded system. Swift uses – Deep learning, Ios apps, IOT. C# uses – Game development, System programming, OT & Real time system. THE C++ INTEGRATED DEVELOPMENT ENVIRONMENT Menu Bar - -Window Close Box - Number Title Bar - Desktop/ Editor - -Scroll Bar Frame - Resize Corner - -Zoom box Message Compiler Window - Status Bar - 1. Menu Bar Is a region on top of a screen where drop down list of menus are displayed. 2. Close box Found at the upper left corner of the screen that is used for closing active window. 3. Title bar Located below menu bar, and is used to display the name of the active window. 4. Desktop/Editor The area in the middle of screen at which several list of different types of windows can be placed. 5. Frame Serves as a window border 6. Resize Corner It is used to change the size of the active window. 7. Message Compiler Window lies beneath the edit window and is used to display various compiler or linker messages 8. Status Area Found at the bottom part of the screen that contains lists of shortcut keys. It also serves as a source of user’s help. 9. Window number It identifies the number of your window. 10. Scroll bar Used to scroll the content of the window horizontally or vertically. 11. Zoom Box Used to view the window to a full screen PROGRAMMING PROCESS 1.) Define the Problem 2.) Analyze the Problem 3.) Code the Program 4.) Debug and Test the Program 5.) Document the Program C++ BACKSLASH CODE CODE MEANING \a alert (bell) \n newline \b backspace \f formfeed \r Carriage return \t tab \v vertical tab \\ backslash \’ Single quote mark \” Double quote mark \0 null