SlideShare a Scribd company logo
Basic Java Programming
Sasidhara Marrapu
Introduction to computers
and programming
 What is a Computer?
 How do computer works?
 Computer System Parts
 Quiz
 Computer Language
 What is Programming?
 Problem Solving Steps:
 Algorithm
 Pseudocode
 Flow Charts
• Lab Problem
• Write Pseudocode
• Draw Flow Chart
• Home Work
• Write Pseudocode
• Draw Flow Chart
What is Computer?
• A programmable electronic machine that
performs
• high-speed mathematical or logical
operations
• that assembles, stores, processes
information.
• A computer is a machine that receives
input data which it then
processes/compute and outputs the
results.
How Computer Work?
Instructions
Information
Processses
Results
How Computer Work?
Data
Information
Processes/co
mputes
Results
Parts of a Computer System:
• Two Parts
• Hardware
• Software
• Hardware: Physical Electronic Devices
• Input : Keyboard, Mouse
• System unit:
• Random Access Memory (RAM)
• Central Processing Unit (CPU)
• Output: Monitor, Printer
• Secondary Storage: Disk Drive
Parts of a Computer System: Hardware
Mouse
Camera
Scanner
Keyboard
Price
Scanner
Speakers
Printer
Monitor
Parts of a Computer System: Software
 Instructions for the hardware.
 Actions to be performed
 A set of instructions is called a program.
 Driving force behind the computer
 Without a program – What is a computer?
 Collection of Useless Hardware
 2 purposes:
 Tell the computer what to do
 Tell other people what we want the computer to do.
QUIZ
What are the four basic components of a computer?
A. Input devices, output devices, printing, and typing
B. Input devices, processing unit, storage, and output devices
C. Input devices, cpu, output devices, and RAM
What does a storage unit provide?
A. A place to show data
B. A place to store currently worked on information
C. A place to store information
QUIZ
What are examples of storage devices?
A. Keyboards, flash drive, printer
B. Flash drive, RAM, DVD-ROM
C. Hard drive, DVD-ROM, flash drive
What is the processing unit?
A. The brains of the computer
B. This the main circuit board that all other internal components are
connected to.
C. A device that receives, processes, and presents information.
What Language Computer Understand?
• Uses Binary Language - which is “0”
and “1”
• A single digit (0 or 1) is called a bit
• A byte is made up of 8 bits.
• Data and instructions (numbers,
characters, strings, etc.) are encoded
as binary numbers - a series of bits
(one or more bytes made up of zeros
and ones)
What is Programing?
• Computer programs are a detailed set of instructions given to the
computer
• They tell the computer:
1. What actions you want the computer to perform
2. The order those actions should happen in
• Examples:
1. Adding two numbers
2. Drawing Circle
• An effective program therefore needs:
1. A thorough understanding of the problem
2. A well thought-out, step-by-step solution to the problem
3. The most valuable part of learning to program is learning how to think about
arranging the sequence of instructions to solve the problem or carry out the
task
Problem Solving?
• A Good Problem Solver is Better Programmer
• Problem Solving Steps -
1. U – Understand the Problem
2. D – Devise a Good Plan to Solve
3. I – Implement the Plan
4. E – Evaluate the Solution
Step 1 - Understand the Problem
• What
 is the Problem to be solved?
 is the unknown?
 is the condition?
 is the data?
 is needed to solve the problem?
 actions need to take place?
• Identify the inputs and outputs
• Identify the processes needed to produce the outputs from the
given inputs
• Draw a figure. Introduce suitable notation.
• Isolate Principle parts of the problem.
Step 2 - Devise a Plan
 Find connections between the knowns and unknowns.
 Simplify: Break the problem into smaller sub-problems
 Design a solution
 Make a plan or list of actions to implement the solution
 Algorithm / Flowchart / Psuedocode
Step 2 - Devise a Plan (cont.)
• Algorithm
• A FINITE set of clear, executable steps that will eventually
terminate to produce the desired outcome
• Logical design used to solve problems – usually a list of
actions required to perform task
• Pseudocode
• Written like program code but more “English Like” and
doesn’t have to conform to language syntax
• Flowchart
• Diagram that visually represents the steps to be performed
to arrive at solution.
Step 3 - Implement the Plan
 Implement in a Programming Language
 Carry out the plan checking the preliminary results at each
step.
 Code A Little - Test A lot
Step 4 - Evaluate the Solution
• Run the Code
• Check results repeatedly and thoroughly
• Use numerous test cases or data sets
• Use highly varied test case, including expected as well as
and unexpected cases
• Look for new solutions
• Is there a better, easier, or more efficient solution
• Can other problems be solved using these techniques?
FLOW CHART SYMBOLS
TERMINAL – the beginning or ending of
a program
INPUT/OUTPUT – where the user of the program
is asked for information (INPUT) or where the
program displays a result (OUTPUT)
PROCESSING – shows any mathematical
operation
CALL – shows any other pieces of the
program that are called upon
DECISION – represents any action where the
computer is making a decision
Problem 1:
Write an algorithm and draw a flowchart that will read the two
sides of a rectangle and calculate its area.
Pseudocode:
• Input the width (W) and Length (L) of a rectangle
• Calculate the area (A) by multiplying L with W
• Print A?
Problem 1:
Algorithm:
Step 1: Input W, L
Step 2: A  L x W
Step 3: Print A
FlowChart
Start
Input W and L
A = L x W
Print A
Stop
Problem 2:
Write an algorithm to determine a student’s final grade and indicate
whether it is passing or failing. The final grade is calculated as the
average of four marks (50).
Pseudocode:
• Input a set of 4 marks
• Calculate their average by summing and dividing by 4
• if average is below 50
• Print “FAIL”
• else
• Print “PASS”
Problem 2:
Detailed Algorithm:
Step 1: Input M1,M2,M3,M4
Step 2: GRADE (M1+M2+M3+M4)/4
Step 3: if (GRADE < 50) then
Print “FAIL”
else
Print “PASS”
Endif
Programming Fundamentals: Putting
the Instructions Together
• Sequential Processing
• A List of Instructions
• Conditional Execution
• Ifs
• Repetition
• Looping / Repeating
• Stepwise Refinement / Top-Down Design
• Breaking Things into Smaller Pieces
• Calling Methods / Functions / Procedures / Subroutines
• Calling a segment of code located elsewhere
• Reuse of previously coded code segment
Methods of Programming
• Procedural
• Defining set of steps to transform inputs into outputs
• Translating steps into code
• Constructed as a set of procedures
• Each procedure is a set of instructions
• Object-Oriented
• Defining/utilizing objects to represent real-world entities that work
together to solve problem
• Basic O-O Programming Components
• Class
• Object/Instance
• Properties
• Methods
Home Work
Write an algorithm, pseudo code and flow chart to read three
numbers and print the largest number.

More Related Content

PPT
Unit 1 python (2021 r)
praveena p
 
PDF
Practical 01 (detailed)
Muhammadalizardari
 
PPT
Problem solving using Computer
David Livingston J
 
PPT
Computer Program- Introduction, characteristics and stages
Anjali Technosoft
 
PDF
Problem Solving Techniques and Introduction to C
Prabu U
 
PPT
Programming fundamentals lecture 1&2
Raja Hamid
 
PPTX
Programming Fundamentals
Trivuz ত্রিভুজ
 
PPTX
Computational thinking
r123457
 
Unit 1 python (2021 r)
praveena p
 
Practical 01 (detailed)
Muhammadalizardari
 
Problem solving using Computer
David Livingston J
 
Computer Program- Introduction, characteristics and stages
Anjali Technosoft
 
Problem Solving Techniques and Introduction to C
Prabu U
 
Programming fundamentals lecture 1&2
Raja Hamid
 
Programming Fundamentals
Trivuz ত্রিভুজ
 
Computational thinking
r123457
 

What's hot (17)

PPSX
CS106 Lab 1 - Introduction
Nada Kamel
 
PPT
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Anjali Technosoft
 
PDF
Unit 1-problem solving with algorithm
rajkumar1631010038
 
PPTX
Programming logic &practices
HABEEBRAHMANKALATHIL
 
PPT
Unit 1 program development cycle
Dhana malar
 
PPT
6months industrial training in labview, jalandhar
deepikakaler1
 
PPT
6 weeks summer training in labview,jalandhar
deepikakaler1
 
PPTX
Algorithm &amp; flowchart
saurabh sen sky
 
PPTX
Flowcharts and pseudocodes
Dr Piyush Charan
 
PPT
Unit ii introduction to vba
Dhana malar
 
PPTX
Programming process and flowchart
hermiraguilar
 
PPT
Data structures & problem solving unit 1 ppt
aviban
 
PPTX
Introduction to computer_lec_04_fall_2018
Ramadan Babers, PhD
 
PDF
problem solving and design By ZAK
Tabsheer Hasan
 
PPTX
Flowcharting and Algorithm
Zeinna Belle Desamito
 
PPT
(Prog213) (introduction to programming)v1
Aaron Angeles
 
CS106 Lab 1 - Introduction
Nada Kamel
 
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Anjali Technosoft
 
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Programming logic &practices
HABEEBRAHMANKALATHIL
 
Unit 1 program development cycle
Dhana malar
 
6months industrial training in labview, jalandhar
deepikakaler1
 
6 weeks summer training in labview,jalandhar
deepikakaler1
 
Algorithm &amp; flowchart
saurabh sen sky
 
Flowcharts and pseudocodes
Dr Piyush Charan
 
Unit ii introduction to vba
Dhana malar
 
Programming process and flowchart
hermiraguilar
 
Data structures & problem solving unit 1 ppt
aviban
 
Introduction to computer_lec_04_fall_2018
Ramadan Babers, PhD
 
problem solving and design By ZAK
Tabsheer Hasan
 
Flowcharting and Algorithm
Zeinna Belle Desamito
 
(Prog213) (introduction to programming)v1
Aaron Angeles
 
Ad

Similar to Pj01 1-computer and programming fundamentals (20)

PDF
Algorithm.pdf
MIT,Imphal
 
PPTX
Cs1123 2 comp_prog
TAlha MAlik
 
PPT
C programming for Computing Techniques
Appili Vamsi Krishna
 
PPT
programming language(C++) chapter-one contd.ppt
Fuadsabseb
 
PPTX
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
PPT
Computer Programming Computer Programming
arifhasan88
 
PPT
computer programming introduction ppt.ppt
AlazarAlemayehu2
 
PDF
PROGRAMMING IN C UNIT I.pdffffffffffffffffffffffffd
dinesh620610
 
PPTX
Introduction to computer programming
Sangheethaa Sukumaran
 
PDF
01 - Introduction to Computer and Algorithm (1).pdf
s241141868
 
PPTX
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
PPTX
Chapter 1 Introduction to computer components
BoonsaaMulataa
 
PPT
01CHAP_1.PPT
ManoRanjani30
 
PPTX
Introduction.pptx
ssusera8c91a
 
PPT
Comp102 lec 1
Fraz Bakhsh
 
PPTX
UNIT-111.pptx
JALLAANITHAREDDY
 
PPTX
Lec-ProblemSolving.pptx
miansaad18
 
PPTX
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
HarshJha34
 
PDF
Algorithmic problem sloving
Mani Kandan
 
DOCX
Lecture1
Andrew Raj
 
Algorithm.pdf
MIT,Imphal
 
Cs1123 2 comp_prog
TAlha MAlik
 
C programming for Computing Techniques
Appili Vamsi Krishna
 
programming language(C++) chapter-one contd.ppt
Fuadsabseb
 
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
Computer Programming Computer Programming
arifhasan88
 
computer programming introduction ppt.ppt
AlazarAlemayehu2
 
PROGRAMMING IN C UNIT I.pdffffffffffffffffffffffffd
dinesh620610
 
Introduction to computer programming
Sangheethaa Sukumaran
 
01 - Introduction to Computer and Algorithm (1).pdf
s241141868
 
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
Chapter 1 Introduction to computer components
BoonsaaMulataa
 
01CHAP_1.PPT
ManoRanjani30
 
Introduction.pptx
ssusera8c91a
 
Comp102 lec 1
Fraz Bakhsh
 
UNIT-111.pptx
JALLAANITHAREDDY
 
Lec-ProblemSolving.pptx
miansaad18
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
HarshJha34
 
Algorithmic problem sloving
Mani Kandan
 
Lecture1
Andrew Raj
 
Ad

Recently uploaded (20)

PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Best ERP System for Manufacturing in India | Elite Mindz
Elite Mindz
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PPT
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Software Development Methodologies in 2025
KodekX
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Software Development Company | KodekX
KodekX
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Best ERP System for Manufacturing in India | Elite Mindz
Elite Mindz
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Software Development Methodologies in 2025
KodekX
 

Pj01 1-computer and programming fundamentals

  • 2. Introduction to computers and programming  What is a Computer?  How do computer works?  Computer System Parts  Quiz  Computer Language  What is Programming?  Problem Solving Steps:  Algorithm  Pseudocode  Flow Charts • Lab Problem • Write Pseudocode • Draw Flow Chart • Home Work • Write Pseudocode • Draw Flow Chart
  • 3. What is Computer? • A programmable electronic machine that performs • high-speed mathematical or logical operations • that assembles, stores, processes information. • A computer is a machine that receives input data which it then processes/compute and outputs the results.
  • 6. Parts of a Computer System: • Two Parts • Hardware • Software • Hardware: Physical Electronic Devices • Input : Keyboard, Mouse • System unit: • Random Access Memory (RAM) • Central Processing Unit (CPU) • Output: Monitor, Printer • Secondary Storage: Disk Drive
  • 7. Parts of a Computer System: Hardware Mouse Camera Scanner Keyboard Price Scanner Speakers Printer Monitor
  • 8. Parts of a Computer System: Software  Instructions for the hardware.  Actions to be performed  A set of instructions is called a program.  Driving force behind the computer  Without a program – What is a computer?  Collection of Useless Hardware  2 purposes:  Tell the computer what to do  Tell other people what we want the computer to do.
  • 9. QUIZ What are the four basic components of a computer? A. Input devices, output devices, printing, and typing B. Input devices, processing unit, storage, and output devices C. Input devices, cpu, output devices, and RAM What does a storage unit provide? A. A place to show data B. A place to store currently worked on information C. A place to store information
  • 10. QUIZ What are examples of storage devices? A. Keyboards, flash drive, printer B. Flash drive, RAM, DVD-ROM C. Hard drive, DVD-ROM, flash drive What is the processing unit? A. The brains of the computer B. This the main circuit board that all other internal components are connected to. C. A device that receives, processes, and presents information.
  • 11. What Language Computer Understand? • Uses Binary Language - which is “0” and “1” • A single digit (0 or 1) is called a bit • A byte is made up of 8 bits. • Data and instructions (numbers, characters, strings, etc.) are encoded as binary numbers - a series of bits (one or more bytes made up of zeros and ones)
  • 12. What is Programing? • Computer programs are a detailed set of instructions given to the computer • They tell the computer: 1. What actions you want the computer to perform 2. The order those actions should happen in • Examples: 1. Adding two numbers 2. Drawing Circle • An effective program therefore needs: 1. A thorough understanding of the problem 2. A well thought-out, step-by-step solution to the problem 3. The most valuable part of learning to program is learning how to think about arranging the sequence of instructions to solve the problem or carry out the task
  • 13. Problem Solving? • A Good Problem Solver is Better Programmer • Problem Solving Steps - 1. U – Understand the Problem 2. D – Devise a Good Plan to Solve 3. I – Implement the Plan 4. E – Evaluate the Solution
  • 14. Step 1 - Understand the Problem • What  is the Problem to be solved?  is the unknown?  is the condition?  is the data?  is needed to solve the problem?  actions need to take place? • Identify the inputs and outputs • Identify the processes needed to produce the outputs from the given inputs • Draw a figure. Introduce suitable notation. • Isolate Principle parts of the problem.
  • 15. Step 2 - Devise a Plan  Find connections between the knowns and unknowns.  Simplify: Break the problem into smaller sub-problems  Design a solution  Make a plan or list of actions to implement the solution  Algorithm / Flowchart / Psuedocode
  • 16. Step 2 - Devise a Plan (cont.) • Algorithm • A FINITE set of clear, executable steps that will eventually terminate to produce the desired outcome • Logical design used to solve problems – usually a list of actions required to perform task • Pseudocode • Written like program code but more “English Like” and doesn’t have to conform to language syntax • Flowchart • Diagram that visually represents the steps to be performed to arrive at solution.
  • 17. Step 3 - Implement the Plan  Implement in a Programming Language  Carry out the plan checking the preliminary results at each step.  Code A Little - Test A lot
  • 18. Step 4 - Evaluate the Solution • Run the Code • Check results repeatedly and thoroughly • Use numerous test cases or data sets • Use highly varied test case, including expected as well as and unexpected cases • Look for new solutions • Is there a better, easier, or more efficient solution • Can other problems be solved using these techniques?
  • 19. FLOW CHART SYMBOLS TERMINAL – the beginning or ending of a program INPUT/OUTPUT – where the user of the program is asked for information (INPUT) or where the program displays a result (OUTPUT) PROCESSING – shows any mathematical operation CALL – shows any other pieces of the program that are called upon DECISION – represents any action where the computer is making a decision
  • 20. Problem 1: Write an algorithm and draw a flowchart that will read the two sides of a rectangle and calculate its area. Pseudocode: • Input the width (W) and Length (L) of a rectangle • Calculate the area (A) by multiplying L with W • Print A?
  • 21. Problem 1: Algorithm: Step 1: Input W, L Step 2: A  L x W Step 3: Print A FlowChart Start Input W and L A = L x W Print A Stop
  • 22. Problem 2: Write an algorithm to determine a student’s final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks (50). Pseudocode: • Input a set of 4 marks • Calculate their average by summing and dividing by 4 • if average is below 50 • Print “FAIL” • else • Print “PASS”
  • 23. Problem 2: Detailed Algorithm: Step 1: Input M1,M2,M3,M4 Step 2: GRADE (M1+M2+M3+M4)/4 Step 3: if (GRADE < 50) then Print “FAIL” else Print “PASS” Endif
  • 24. Programming Fundamentals: Putting the Instructions Together • Sequential Processing • A List of Instructions • Conditional Execution • Ifs • Repetition • Looping / Repeating • Stepwise Refinement / Top-Down Design • Breaking Things into Smaller Pieces • Calling Methods / Functions / Procedures / Subroutines • Calling a segment of code located elsewhere • Reuse of previously coded code segment
  • 25. Methods of Programming • Procedural • Defining set of steps to transform inputs into outputs • Translating steps into code • Constructed as a set of procedures • Each procedure is a set of instructions • Object-Oriented • Defining/utilizing objects to represent real-world entities that work together to solve problem • Basic O-O Programming Components • Class • Object/Instance • Properties • Methods
  • 26. Home Work Write an algorithm, pseudo code and flow chart to read three numbers and print the largest number.