Java 1: Code Using Standard Algorithm

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

JAVA 1

CODE USING
STANDARD
ALGORITHM
WHAT IS AN
ALGORITHM?
▸ Generally, an algorithm is a step-by-
step procedure to solve problems. A
guide for installing 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 language
or in a pseudocode.

2
STEPS IN WRITING AN ALGORITHM
IN PROGRAMMING

1 Determine the outcome


of your code
What is the specific problem you want to
solve or the task you want it to accomplish?
STEPS IN WRITING AN ALGORITHM
IN PROGRAMMING

2 DECIDE ON A
STARTING POINT
Finding your starting and ending point are
crucial to listing the steps of the process.
2. DECIDE ON A STARTING POINT
To determine a starting point, determine
the answers to these questions:

1. What data/inputs are available?


2. Where is that data located?
3. What formulas are applicable to the issue
at hand?
4. What are the rules to working with the
available data?
5. How do the data values relate to each
other?
5
STEPS IN WRITING AN ALGORITHM
IN PROGRAMMING

3 Find the ending point of


the algorithm
3. Find the ending point of the algorithm

To determine a end point, determine the


answers to these questions:

1. What facts will we learn from the process?


2. What changes from the start to the end?
3. What will be added or no longer exist?

7
STEPS IN WRITING AN ALGORITHM
IN PROGRAMMING

4 List the steps from start


to finish
Start with broad steps
STEPS IN WRITING AN ALGORITHM
IN PROGRAMMING

5 Determine how you will


accomplish each step
Now that you have a step - by-step outline,
it's time to think about how you might code
each step.
“ Quotations are commonly
printed as a means of
inspiration and to invoke
philosophical thoughts from
the reader.

10
EXAMPLE 1: Write an algorithm to
convert the length in feet to centimetre.

11
EXAMPLE 2: Write an algorithm that
will read the two sides of a rectangle
and calculate its area.

12
Write an algorithm to print 1 to 20.

13
Write an algorithm to convert temperature:
Fahrenheit to Celsius. C=5/9*(F-32).

14
You can also split your
content
White Black
Is the color of milk and fresh Is the color of ebony and of
snow, the color produced by outer space. It has been the
the combination of all the symbolic color of elegance,
colors of the visible solemnity and authority.
spectrum.

15
In two or three
columns
Yellow Blue Red
Is the color of gold, butter and Is the colour of the clear sky Is the color of blood, and
ripe lemons. In the spectrum of and the deep sea. It is located because of this it has
visible light, yellow is found between violet and green on historically been associated
between green and orange. the optical spectrum. with sacrifice, danger and
courage.

16
A picture is worth a
thousand words

A complex idea can be conveyed


with just a single still image,
namely making it possible to
absorb large amounts of data
quickly.

17
Want big impact?
Use big image.

18
Use diagrams to
explain your ideas

Vestibulum congue Vestibulum congue Vestibulum congue


tempus tempus tempus

Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
consectetur adipiscing elit, sed do consectetur adipiscing elit, sed do do eiusmod tempor. Ipsum dolor sit amet elit, sed do eiusmod
eiusmod tempor. eiusmod tempor. tempor.

19
And tables to compare
data
A B C

Yellow 10 20 7

Blue 30 15 10

Orange 5 24 16

20
Maps Find more maps at slidescarnival.com/extra-free-resources-icons-and-maps

our office

21
89,526,124
Whoa! That’s a big number, aren’t you proud?

22
89,526,124$
That’s a lot of money

185,244 users
And a lot of users

100%
Total success!

23
Our process is easy
20XX 20XX 20XX 20XX

Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum

Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit
amet, consectetur amet, consectetur amet, consectetur amet, consectetur
adipiscing. adipiscing. adipiscing. adipiscing.

24
Let’s review some
concepts
Yellow Blue Red
Is the color of gold, butter and ripe Is the colour of the clear sky and the deep Is the color of blood, and because of this
lemons. In the spectrum of visible light, sea. It is located between violet and green it has historically been associated with
yellow is found between green and on the optical spectrum. sacrifice, danger and courage.
orange.

Yellow Blue Red


Is the color of gold, butter and ripe Is the colour of the clear sky and the deep Is the color of blood, and because of this
lemons. In the spectrum of visible light, sea. It is located between violet and green it has historically been associated with
yellow is found between green and on the optical spectrum. sacrifice, danger and courage.
orange.

25
You can insert graphs from Excel or Google Sheets
26
Mobile project
Show and explain your Place your screenshot here

web, app or software


projects using these
gadget templates.

27
Tablet project
Show and explain your Place your screenshot here

web, app or software


projects using these
gadget templates.

28
Desktop project
Show and explain your
Place your screenshot here
web, app or software
projects using these
gadget templates.

29
THANKS!
Any questions?
You can find me at:
▸ @username
▸ user@mail.me

30
Credits
Special thanks to all the people who made and released these
awesome resources for free:
▸ Presentation template by SlidesCarnival
▸ Illustrations by Sergei Tikhonov
▸ Photographs by Unsplash

31
Presentation design
This presentation uses the following typographies:
▸ Titles: Raleway
▸ Body copy: Barlow
Download for free at:
https://www.fontsquirrel.com/fonts/raleway
https://www.fontsquirrel.com/fonts/barlow

You don’t need to keep this slide in your presentation. It’s only here to serve you as a design guide if you need to create new slides or
download the fonts to edit the presentation in PowerPoint®

32
Extra
resources
Illustrations created by
Sergei Tikhonov.

Free illustrations published


under the MIT License. You
can use them for personal
and commercial projects,
without the need to include
attribution.

See license.

33
Extra
resources
Illustrations created by
Sergei Tikhonov.

Free illustrations published


under the MIT License. You
can use them for personal
and commercial projects,
without the need to include
attribution.

See license.

34
SlidesCarnival icons are editable shapes.

This means that you can:


▸ Resize them without losing quality.
▸ Change fill color and opacity.
▸ Change line color, width and style.
Isn’t that nice? :)

Examples:

Find more icons at


slidescarnival.com/extra-free-resources-icons-and-m
aps

35
Diagrams and infographics

36
You can also use any emoji as an icon!

😉
And of course it resizes without losing quality.
How? Follow Google instructions
https://twitter.com/googledocs/status/730087240156643328

✋👆👉👍👤👦👧👨👩👪💃🏃💑❤😂😉😋
😒😭😸💣
👶😸 🐟🍒🍔💣 📌📖🔨🎃🎈🎨🏈🏰🌏🔌🔑
and
many more...

37
Free templates for all your presentation needs

For PowerPoint and 100% free for personal or Ready to use, professional Blow your audience away
Google Slides commercial use and customizable with attractive visuals
Instructions
for use
EDIT IN GOOGLE SLIDES EDIT IN POWERPOINT®
Click on the button under the presentation Click on the button under the presentation
preview that says "Use as Google Slides preview that says "Download as PowerPoint
Theme". template". You will get a .pptx file that you can
edit in PowerPoint.
You will get a copy of this document on your
Google Drive and will be able to edit, add or Remember to download and install the fonts used
delete slides. in this presentation (you’ll find the links to the
font files needed in the Presentation design slide)
You have to be signed in to your Google
account.

More info on how to use this template at www.slidescarnival.com/help-use-presentation-template


This template is free to use under Creative Commons Attribution license. You can keep the Credits slide or mention SlidesCarnival
and other resources used in a slide footer.
39

You might also like