0% found this document useful (0 votes)
22 views5 pages

Reviewer in Comp Prog

Uploaded by

mykoreyes0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Reviewer in Comp Prog

Uploaded by

mykoreyes0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Reviewer in Computer Programming 1 ● Decision Block - the diamond, it

Bunsua, Kurbin Ross C. BSCS 1E indicates the decision based on the


input.
Algorithm - step by step procedure to solve a ● Process Block - the rectangle, used
problem or achieve a specific goal. for any input/output operations, and
indicates that the computer is to
Programming Algorithm - a finite set of obtain data, and specifies value of
instructions to accomplish a specific task variables
● Connector block - circles, used to
Characteristics of an Algorithm connect the flowchart from one page
● The instruction must be exact step to another
and clear
● There is a finite or end point Computer - a machine that performs a
● The output must have the correct variety of task such as computing and data
output. manipulation. THe physical parts of a
computer are as follow;
Pseudocode ● Central Processing Unit (CPU)
● is a simple way of writing a ● Primary or Random Access Memory
programming code in english (RAM)
● A text-based details ● Secondary Memory
● Artificial and informal language used ● Input and Output Devices
by programmers
Software - programs and instructions used to
Flowcharts tell the computer hardware what to do
● A graphical representation of
sequence of operations System Software - programs that are needed
● Contains symbols showing how the to keep and compile all the hardware and
program would work software systems
● It shows logic of an algorithm
Application Software - programs designed to
Symbols and Operations allow people perform specific task
● Terminal Block - oval-shaped use to
indicate “start/stop” Programming Language - standard
● Flow Lines - arrows used to indicate communication technique to transfer
the flow of the algorithm instructions to a computer
● Initialization Block - the hexagon,
used to declare or initialize variables Computer Programming - writing
● Input/Output Block - the instructions and giving them to the computer.
parallelogram, indicates the general It is also a process of writing, testing,
input and output operation, its output debugging, and maintaining a code.
is dependent to the decision block
Computer Program - set of instructions ● Reliable
written in a computer language, as well as an ● Flexible
organized list of instruction.

Programming - implementing one or more Java Program


interrelated abstract algorithms using a ● Every line of code tht runs in Java
particular programming language to produce a must be inside a class
concrete computer program.
Syntax:
Programmer - a person who writes the
required computer programs

Programming Development Life Cycle


1. Analyze the Problem - involves
understanding the problem and
Java Statement - specifies the action to be
determining what is required to solve
performed during the execution of the
it.
program
2. Design the Program - develop a
detailed logic plan for solving the
problem
● Statements should be enclosed with
3. Code the Program - execution of the
curly braces all the time
plans develop using a programming
language
Comments - are used to add notes and
4. Test Program - uses a predefined
documentation to source codes. THe types of
procedure and has a predictable
comments are as follows:
outcomes
● Single line comments (//)
5. Maintain Program - making changes
and improvements to the program

Compiler - specific software that gets the


whole source code, which is a computer ● Block Comment (/**/) - used for two
program written in human understandable line comments
form, and converts it to object code which is
machine understandable form

Interpreter - is translating and executing one ● JavaDoc Comment (/** **/) -


source code to an object code only by one. comments for multiple lines

Characteristics of a Well-Defined Program


● Correct and Accurate Java Identifiers - words that are used by
● Easy to Understand programmers to properly identify name a
● Easy to maintain and update class, procedure, methods, or variables. Rules
● Efficient in naming identifiers are as follows;
● Can use alphabets, numbers, exponential part. “f” is always required
underscore, and a dollar sign on a float literal
● Cannot start with a number
● Keywords,reserved words are banned
Guidelines in writing a Java Identifiers ● Boolean Literals - tells whether the
● Name the identifier close to its output is true or false, and is used for
functionality evaluating logical conditions
● Methods and variable name start in
lowercase while classes start in upper
case
● Use underscore or capitalize initials for
multiword identifiers ● String Literal - sequence of
● Avoid stating the identifiers using an characters from zero to more and is
underscore enclosed in double quotation marks

Java Programming Keywords - a set of fixed


symbols into the syntax of the language, these
● Character Literal - enclosed in a
are reserved and cannot be used as identifiers
single quotation marks

Java Literals - items in a program whose


values do not change. Classifications are a
Data Types - specify the different sizes and
follow;
values that can be stored in the variable. Two
● Integer Literals - are used to
types of data types in Java are as follow;
represent specific integer value
● Primitive data types - includes
1. Octal LIterals - begins with
boolean, char, byte. Short, int, long,
the digit 0 and contains any of
float, and double
the digits 0 through 7. example
● Non-primitive data types - includes
: 0123, 04567, 0356, etc.
classes, interfaces, and arrays.
2. Decimal Literal - contains any
of the digits 0 through 9. The
Boolean Data Type - values result to true or
first digit cannot be 0. Example
false, with its initial value as false
: 1234, 56789, 1.234, 5.6789 etc.
3. Hexadecimal Literal - the 0x
or 0X is to be placed in the
beginning of a number.
example : 0X1234, 0X5678, Char Data Type - represents a 16-bit Unicode
0x6754 Character, and must be enclosed in a single
4. Binary Laterals - used 0b or quote
0B as prefix next to number or
digits. example OB123,
0B456789, 0b345, etc. Integer Data Type - can store whole numbers
● Floating-Point Literals - numbers
that have a decimal point or an
Floating Point Data Types - can store between the two operators. R, count
fractional numbers or 7-digit decimal an ends =10
with “f”

Double Data Type - can store fractional


numbers or 15-digit decimal and ends with “d” ● Assignment Operators - used to
combine the “=” operator with one of
the binary arithmetic operators.
Example : c=9
String Data Type - used to store a sequence
of character or text

Java Variables - containers for storing data


values
Java Expressions - produces a result and
returns a value that can be a combination of
variables, literals, and operators.
● To compute values
● To assign values to variables
● To control the flow of execution ● Relational operators - used to
Java Operators - are used to manipulate the compare the results of two expression
values of variables. The types of operators are or operand
as follows;
● Arithmetic operators - used to
perform the four mathematical
operations and module (remainder)

● Logical operators - used to return a


true or false value based on the state
of the variables

● Increment(++)/Decrement(--)
Operators - illustrates the difference
4. Nested if - means that an if
statement is inside an if
statement

Control Structure
● refers to the order of execution of
instruction in a program
● Allow non-sequential execution of
program instructions
● Instruction of a whole block of
instruction can be executed, repeated ● Switch Statement - used to
or skipped perform different actions
based on different conditions
Types of Control Structure
● Conditional Statement - used to
perform different actions based on
different conditions
1. if - specifies that a statement
will be executed if and only if a
certain boolean statement is
true

2. if-else statement - executes


some code if a condition is
true and another code if that
condition is false

3. If-else if-else statement -


executes different codes for
more than two conditions

You might also like