Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Flowchart-Copy-1

The document outlines the programming process in Java, detailing five key steps: understanding the problem, planning the logic, coding the program, testing it, and putting it into production. It also explains flowcharts, including their standard symbols and structures such as sequence, decision, and repetition. Additionally, it provides examples of each structure to illustrate their application in programming.

Uploaded by

sophiagabris8
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Flowchart-Copy-1

The document outlines the programming process in Java, detailing five key steps: understanding the problem, planning the logic, coding the program, testing it, and putting it into production. It also explains flowcharts, including their standard symbols and structures such as sequence, decision, and repetition. Additionally, it provides examples of each structure to illustrate their application in programming.

Uploaded by

sophiagabris8
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Week4 Session 1

COMPUTER PROGRAMMING JAVA


PROGRAM LOGIC FORMULATION

COMPUTER PROGRAMMING JAVA


The programming process

1. Understand the problem.


2. Plan the Logic.
3. Code the program.
4. Test the program
5. Put the program into production.

COMPUTER PROGRAMMING JAVA


1. Understand the problem.

• A careful analysis of what is needed


in the program must be considered.
• Programmers must also understand
what the users of the program wants.
• You must know exactly what you will
do. You must formulate a clear
statement of what is to be done.
COMPUTER PROGRAMMING JAVA
2. Plan the Logic.

• The programmer will plan the


sequence of events that will lead
from the available input to the
desired output.
• Flowchart
• Algorithm
• Pseudocode
COMPUTER PROGRAMMING JAVA
3. Code the program.

• It is a process of translating the


algorithm into high-level language or
simply coding means writing a code.

COMPUTER PROGRAMMING JAVA


4. Test the program

• Test and debug the program.


• make sure that it is in a form you
intended if not produce a solution to
your program.

COMPUTER PROGRAMMING JAVA


5. Put the program into production.

• Once a program has been tested and


completely done, the organization
can use it.
• Documentation
• Maintenance

COMPUTER PROGRAMMING JAVA


5. Put the program into production.

• Maintenance - involves
repairing the bugs that are
spotted by program users and
making alterations of the
program, often in response to
user request for improved
operation or additional program
features.
COMPUTER PROGRAMMING JAVA
5. Put the program into production.

• Documentation - Contains
details at all stages of the
program development cycle.

COMPUTER PROGRAMMING JAVA


Flowchart

COMPUTER PROGRAMMING JAVA


What is a Flowchart?

• A graphical representation of
algorithm.
• A visual representation of the
sequence of steps.

COMPUTER PROGRAMMING JAVA


Flowchart eight standard symbols
Terminator -
Preparation –
signifies the beginning signifies the
and the end of the automated
processing of
process. information.

Decision –
Process – shows
shows how a process is when the
being done. decision
needs to
be made.

COMPUTER PROGRAMMING JAVA


Flowchart eight standard symbols

Input/Output –
Arrow or Direction flow –
identifies
what to input indicates the direction
and signifies and order of the process.
the output.

Off-page
On-page
Connector –
Connector –
used to connect
used to
the flow to
connect the
another page.
flow on the
same page.

COMPUTER PROGRAMMING JAVA


FLOWCHART STRUCTURES

 Sequence Structure
 Decision Structure
 Repetition Structure

COMPUTER PROGRAMMING JAVA


Sequence Structure

 It is a combination of the
logic operations following
each other. That means
the logic flow is continuing
from one process to
another in sequence.
COMPUTER PROGRAMMING JAVA
Sequence Structure

COMPUTER PROGRAMMING JAVA


Sequence Structure
Problem1:
Computing the area of
rectangle.
L= Length of the
Rectangle
W= Width of the
Rectangle
A= Area of the
Rectangle
Flowchart:
COMPUTER PROGRAMMING JAVA
Decision Structure

 One of two possible


actions is taken,
depending on the
condition

COMPUTER PROGRAMMING JAVA


Decision Structure

COMPUTER PROGRAMMING JAVA


Decision Structure
Problem2: Finding
the average of any
three numbers. If the
average is greater
than or equal to 90
print “very good”, else
print “good”.
T = Sum of three number
X = Number 1
Y = Number 2
Z = Number 3
A = Average of three number

COMPUTER PROGRAMMING JAVA


Repetition Structure

 allow you to run one or


more lines of code
repetitively.

COMPUTER PROGRAMMING JAVA


Repetition Structure

COMPUTER PROGRAMMING JAVA


Repetition Structure
START

Problem3:
Num = 0
continuously enter
one whole number A Enter
until user entered 3, if num

the number is not True


Is num END
equal to 3 show the is = 3

number. False
Print
num

A
COMPUTER PROGRAMMING JAVA

You might also like