COMPUTER PROGRAMMING 1 (MIDTERM)

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

IF STATEMENT

Use it to specify a block of C++ code to be executed if a condition is true.

Processing

Used for arithmetic operations and data manipulations.

Decision

Used for decision making between two or more

Input/Output

Used for input and output operation.

Off-page Connector

Used to connect the flowchart portion on a different page.

On-page Connector

Used to join different flowline alternatives.

char AND string DATA TYPE

Values declared as char must be enclosed with a single quotation mark.

char

store a single character/letter/number, or ASCII values

boolean

store true or false values

double

stores fractional numbers, 1 or more decimals sufficient for storing 15 decimal digits, 8 bytes

float

stores fractional numbers, 1 or more decimals sufficient for storing 7 decimal digits, 4 bytes

int

stores whole numbers without decimal, 4 bytes

SUPERCOMPUTERS

the fastest, most powerful computer Fastest supercomputers are capable of processing more than one quadrillion instructions in a single second

FLOWCHART

diagram that depicts a process system or computer algorithm.

Constants

values that are declared at the beginning of the program. It is fixed and you cannot change the value during the program execution.

Variables

values that can change during the program execution.

OPERATORS

special symbols use to perform operations on variables and constant values.

EMBEDDED COMPUTERS

special-purpose computer that functions as a component in a larger product

int float double boolean char

Basic Data Types

Bjarne Stroustrup

C++ ID DEVELOPED BY?

Headers, Class Definition, Member Functions Definitions and Main Function.

C++ PROGRAM STRUCTURE IS DIVIDED INTO VARIOUS SECTIONS, NAMELY:

Assignment operators Arithmetic operators Comparison operators Logical operators

C++ commonly used operators are the following:

SYSTEM UNIT

Case that contains the electronic components of the computer that are used to process data

OUTPUT DEVICE

Hardware component that conveys information to one or more people

Flow line

Indicates the flow of logic by connecting symbols.

SYSTEM SOFTWARE APPLICATION SOFTWARE

2 TYPES OF SOFTWARE

HARDWARE

A computer contains many electric, electronic, and mechanical components

Speed Reliability Consistency Storage Communications

ADVANTAGES OF USING COMPUTERS

INPUT DEVICE

Allows you to enter data and instructions into a computer

SYNTAX ERROR

An error that is detected by the compiler

( +, -, *, /, %)

Arithmetic Operators

+=, -=, *=, /=, %=

Compound Assignment Operators

MOBILE DEVICE

Computing device small enough to hold in your hand

Health Risks Violation of Privacy Public safety Impact on Labor Force Impact on Environment

DISADVANTAGES OF USING COMPUTERS

Signed Unsigned Short Long

Data type modifiers available in C++ are:

COMMUNICATIONS DEVICE

Enables a computer to send and receive data, instructions, and information to and from one or more computers or mobile devices

1979

It was a program designed to translate C with Classes code to ordinary C.

comment line

LINE 1

return 0;

Line 10

WHITESPACE

Line 2, 4 and 6

#include<iostream>

Line 3

using namespace std;

Line 5

int main()

Line 7

Curly braces, { }

Line 8 and 11

cout << "Hello World!" << endl;

Line 9

General-purpose object-oriented programming

OOP MEANS

MOBILE COMPUTER

Personal computer you can carry from place to place

STORAGE DEVICE

Records (writes) and/or retrieves (reads) items to and from storage media

Predefined Process/Function

Represents a group of statements performing one processing task.

Terminal (Stop/Start)

Represents the start and the end of a flowchart.

PROBLEM DEIFINITION PROGRAM DESIGN CODING AND DEBUGGING TESTING DOCUMENTATION MAINTENANCE

STEPS IN PROGRAM DEVELOPMENT

if else if ladder

Several if + else structures can be concatenated with the intention of checking a range of values.

&& Logical AND

TRUE if all statements are true. FALSE if at least one of the statement is false.

|| Logical OR

TRUE if at least one statement is true FALSE if all statements are false.

1985

The C++ Programming Language was published. The language was not officially standardized yet.

Assignment Operator ( = )

The equal sign ( = ) is used to assign a value to a receiving variable. It stores the result of the operation on the right side of the equal sign.

1979

The first C with Classes compiler was called Cfront.

DOCUMENT FLOWCHART

These have the purpose of showing existing controls over document-flow through the components of a system. The chart is read left to right and documents the flow of documents through the various business units.

DATA FLOWCHART

These show "the controls governing data flows in a system. These are used primarily to show the channels that the data is transmitted through the system rather than how control flows."

PROGRAM FLOWCHART

These show the controls placed internally to a program within a system.

SYSTEM FLOWCHART

These show the flow of data to and through the major components of a system such as data entry, programs, storage media, processor and communication network.

WORK FLOW FLOWCHART

To document workflows, often involving tasks, documents and information in offices. A workflow diagram depicts a series of action that defines a job or how work should be done.

NETWORK

a collection of computers and devices connected together, often wirelessly, via communications devices and transmission media

MAINFRAMES

a large, expensive, powerful computer that can handle hundreds or thousands of connected users simultaneously.

GAME CONSOLES

a mobile computing device designed for single-player or multiplayer video games

IDENTIFIER

a name given to identify a variable, function, class, module, or any other user-defined item. It always starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores, and digits (0 to 9).

ALGORITHM

a step-by-step solution to a problem written in simple English or in the language spoken by the programmer. These steps will set as a guide in writing the computer codes.

INTERNET

a worldwide collection of networks that connects millions of businesses, government agencies, educational institutions, and individuals

COMMENTS

added to the program for the sake of the programmer. These are ignored by the compiler.

switch statement

allows an expression to be tested for equality against a list of values. Each value is called a case, and the expression being switched on is checked for each case.

SOFTWARE

also called a program, tells the computer what tasks to perform and how to perform them.

COMPUTER

an electronic device, operating under the control of instructions stored in its own memory.

PERSONAL COMPUTER

can perform all of its input, processing, output, and storage activities by itself

INFORMATION PROCESSING CYCLE

collects all the data and processes it to produce an output or information.

MULTI-LINE

comments start with /* and ends with */. Any text between /* and */ will be ignored by the compiler.

SINGLE-LINE

comments start with two forward slashes (//). Any text between // and the end of the line is ignored by the compiler (will not be executed). A line can only occupy comments only or can be added after the statement/code.

PROGRAM

composed of sequence of statements or instructions. You use a text editor to type/encode your program and then save it on your storage medium, this is now your source code.

SERVERS

controls access to the hardware, software, and other resources on a network Provides a centralized storage area for programs, data, and information

Global variables and constants

declared before int main()or outside of any user-defined function.

Local variables and constants

declared inside the function. You can only use them inside the function where they are declared. When you exit that function, the value of the local variables are also gone.

SOCIAL NETWORKING WEB SITE

encourages members to share their interests, ideas, stories, photos, music, and videos with other registered users

LOGICAL ERROR

error which is cannot be detected by the compiler and hard to detect is the logical error.

increment operator (++) and the decrement operator (--)

increase or reduce by one the value stored in a variable. They are equivalent to +=1 and to -=1, respectively.

GREEN COMPUTING

involves reducing the electricity consumed and environmental waste generated when using a computer

nested if statement

mean an if statement inside another if statement.

1983

name of the language was changed from C with Classes to C++. The++ operator in the C language is an operator for incrementing a variable.

PROGRAM

normally written to process data or information.

Data or information

placed in the memory of computer while the program is executing.

modulo operator

represented by a percentage sign (%), gives the remainder of a division of two values.

! Logical NOT

reverse the result, if the statement is true, it will return FALSE

Flowchart

the graphical representations of the steps on how to solve a particular programming problem. It uses several symbols connected by lines to show the flow or sequence of the solution.

cin statement

the instance of the class istream and is used to read input from the standard input device which is usually a keyboard. Again, you cannot use cin statement without #include<iostream> at the start of your program.

Simula

the name implies is a language primarily designed for simulations.

INSTALLING

the process of setting up software to work with the computer, printer, and other hardware

endl and \n

they insert a new line before they display the next item or message.

IF... ELSE STATEMENT

use it to specify a block of code to be executed if the condition is false.

cout statement

use to display the output to a standard output device like your monitor or screen. It is defined in the <iostream> header file. So, if you do not include the lines: #include <iostream> and using namespace std; at the beginning of your program, errors will appear when you compile your program and your program will not run.


Set pelajaran terkait

Personal Financial Planning FINAL

View Set

MECE-2350 Final Review (Quizlet Edition)

View Set

Exam 1 Eastern Religious Traditions

View Set

CSA+ CH2 Vulnerability Management Part 1/2

View Set

Cultural Anthropology Chapter 10; Kinship and Descent

View Set

the day before ap psychology exam review

View Set