2. Objectives
• Understanding algorithm
• Use pseudocode and flowchart in problem solving
• Understand the different data types
• Identify variables and know its corresponding data type
3. Algorithm
• An algorithm is a Step-by-step procedure to solve problems.
• A guide for new software a manual for assembling appliances,
and even recipes are examples of an algorithm.
• In programming, making an algorithm is exciting they are
expressed in a programming or pseudocode
• Algorithm makes the whole procedure more efficicent as well
as consistent
• It also helps in identifying decision point, processes and
essential variables to solve a problem.
4. PSEUDOCODE
• A pseudocode is a description of an algorithm or a computer
program using natural language.
• The aim of pseudocode is to make reading program easier,
some codes are not essential for human understanding are
omitted
• This language is commonly used in planning out the structure
of a program or a system, like the blueprint for creating a
house or a building.
5. Algorithm for Classifying
Student’s Grade
If student’s grade is Greater than or equal to 60
Print “Passed”
else
Print “Failed”
The example above is an Algorithm of determining whether a
student a specific mark should passed or failed
With the help of pseudocode, one can easily understand it
without having to know the technicalities.
6. Flowchart
• Like Pseudocodes, Flowchart is also a description of an
algorithm or a computer program
• It also serces as the program’s blueprint during the program
Development process
• The differece is that flowchart is a graphical representation of
it
• Flowchart help in the effective analysis if the problem as well
as the application’s or program’s maintenance, thus providing
ease in identifying potential improvements of the system or
programs
11. Identifying System
Specification and requirments
• In this substage of planning the needed description of the
system or application is acquired
• Purpose, System and user interfaces, database requirements,
quality standards, operations, overview of the whole
application, and other requirements needed for the project
development is defined
• This substage helps the programmers as well the clients in
foreseeing the scope and limitation of the application to be
made
12. Creating the applicable
diagram on the acquired
requirement
• This substage is all about creating flowchart and pseudocodes
based on the requirements acquired from the previous
substage, specifically from the identifying the system and user
interface as well as the database requirments
• From those given data programmers may now start creating
the applicable diagram that will serve as blueprint for the
logical processes or the system it self
13. Obtaining design
Documentation
Is the written description of the overall design or architecture of
the system to be made
• Responsibility-driven Design- describe the role of each object
in the user interface and the information they share
• Architectural design – establish the input and output flow of
the program.
• User-interface design – Focus on user’s interaction towards
GUI
• Procedural Design -lets the programmers use the proposed
system’s flowchart or pseudocode and translate them into
code.
14. Selecting the Design approach
to be followed in coding
• Structure programming and structured design are the two
standard design approaches a programmer can apply in coding
the proposed system
• The design Approaches helps in making codes readable easy
to follow and maintain
• Structured programming describes that a program instruction
must be coded following the order of their implementation in
the system itself
IF student’s grade is greater than or equal to 60
Print “passed”
Else
Print “failed”
15. Data Type
• A data type is a description of a specific data that can be
stored in variable, the amount of memory the item occupies,
and the operations it can be performed
16. Boolean
• A Boolean data type has one of two possible values (usually
denoted true and false), intended to represent the two truth
values of logic and Boolean algebra. It is named after George
Boole, who first defined an algebraic system of logic in the mid
19th century.
17. Byte data type
• Data type to be used if you want to store binary data (set of 0s
and 1s). It is an unsigned type that cannot contain negative
values
18. Char type
• The CHAR data type stores character data in a fixed-length
field. Data can be a string of single-byte or multibyte letters,
numbers, and other characters that are supported by the code
set of your database locale. ... The size of a CHAR column is
byte-based, not character-based.
19. Date
• Data Type that holds data values, time values, or the
combination of both
20. Decimal
• The Decimal data type provides the greatest number of
significant digits for a number. It supports up to 29 significant
digits and can represent values in excess of 7.9228 x 10^28. It
is particularly suitable for calculations, such as financial, that
require a large number of digits but cannot tolerate rounding
errors
21. Double
• The double data type is a double-precision 64-bit IEEE 754
floating point. Its range of values is beyond the scope of this
discussion, but is specified in the Floating-Point Types,
Formats, and Values section of the Java Language
Specification. For decimal values, this data type is generally
the default choice.
22. Integer data type
• The Integer data type provides optimal performance on a 32-
bit processor. The other integral types are slower to load and
store from and to memory.
• The default value of Integer is 0.
23. Long
• The long data type is a 64-bit two's complement integer. The
signed long has a minimum value of -263 and a maximum value
of 263-1. In Java SE 8 and later, you can use the long data type
to represent an unsigned 64-bit long, which has a minimum
value of 0 and a maximum value of 264-1.
24. Object
• These are also referred to as Non-primitive or Reference Data
Type. They are so-called because they refer to any particular
objects. Unlike the primitive data types, the non-primitive
ones are created by the users in Java. Examples include arrays,
strings, classes, interfaces etc.
25. Short
• The short data type is a 16-bit signed two's complement
integer. It has a minimum value of -32,768 and a maximum
value of 32,767 (inclusive). As with byte , the same guidelines
apply: you can use a short to save memory in large arrays, in
situations where the memory savings actually matters.
26. Single
• Use the Single data type to contain floating-point values that
do not require the full data width of Double . In some cases
the common language runtime might be able to pack your
Single variables closely together and save memory
consumption. The default value of Single is 0.
27. String
• A string data type is traditionally a sequence of characters,
either as a literal constant or as some kind of variable. The
latter may allow its elements to be mutated and the length
changed, or it may be fixed (after creation).
28. ACTIVITY
• Create a Program that will classify if a student’s grade must be
marked Passed or Failed. Any Grades lower than 75 is
considered failed. From this given information, please provide
the necessary pseudocode, Flowchart, and data type
Kindly send the activity on my gmail acc