SlideShare a Scribd company logo
1 of 39
Hello!
I am Ma. Wennilou Porazo
Instructor
1
Designing
Applications
After studying Lesson C, you should
be able to:
● Code
○ Instructions added to an application
● Coding is done after planning and building an interface
● TOE charts
○ show which objects and events need to be coded
3
4
5
Coding the Application (cont.)
● Using a Flowchart to Plan a Procedure
● A flowchart shows program logic using standardized
symbols
● Oval: Start/Stop Symbols
● Rectangle: Process symbol; represents a task
● Parallelogram: Input/Output symbol
● Flowline connect the symbols
● Flowcharts depict the same logic as pseudocode
6
7
● btnClear control's task
○ Clear the screen for the next order
● String
● Zero-length string (or empty string)
○ A pair of quotation marks with nothing
between them ("")
8
● Two ways to remove the control contents at run
time:
○ Assign a zero-length string to the Control's
Text property
9
Assigning a Value to a Property During Run Time
● Assignment statement
○ An instruction assigning a value to an object
at run time
● Syntax: object.property=expression
○ object and property are the object and
property names
10
Coding the btnClear Control’s Click Event
Procedure (cont.)
● Using the Focus Method
○ Allows you to move the focus to a specified
control during run time
● Syntax: object.Focus()
○ object is the name of the control that
receives the focus
11
Coding the btnClear Control’s Click Event
Procedure (cont.)
Internally Documenting the Program Code
● Comments
○ Internal documentation in a program
○ Used by the programmers to document a procedure's
purpose or explain section of code
○ Help make code readable
12
Coding the btnClear Control’s Click Event
Procedure (cont.)
● To create a comment, place an apostrophe(')
before a statement
○ The computer ignores all characters after the
apostrophe for the rest of the line
● Comments are color-coded in the IDE
13
14
Writing Arithmetic Expressions
15
Writing Arithmetic Expressions
● Order of operations:
○ PEMDAS(Parentheses, Exponents, Multiplication,
Division, Addition, Subtraction)
● Integer division operator
○ Returns a whole number
● Modulus operator
○ Returns the remainder of the division
16
17
18
Coding the btnClear Control’s Click Event
Procedure (cont.)
● A function is a predefined procedure that
performs a task and returns a value
● Val temporarily converts a string to a number and
returns the number
● Syntax: Val (string)
● You can use Val to correct calculations in the
btnCalc control's Click event procedure
19
20
Coding the btnClear Control’s Click Event
Procedure (cont.)
● The Format Function
● Improves the appearance of numbers
● Syntax: Format (expression, style)
○ Expression: Specifies the number, date, time or string
to format
○ Style: A predefined or user-defined format style
21
Coding the btnClear Control’s Click Event
Procedure (cont.)
● Currency
○ Example of a format style that displays the
number with a dollar sign and two decimal
places.
22
23
24
Testing and Debugging Application
● Test an application using some sample data
○ Use both valid and invalid data
● Valid data
○ Data that the application is expecting
25
Testing and Debugging the Application
● Invalid data
○ Data that the application is not expecting
● Debugging
○ The process of locating and correcting errors in a
program.
○ Errors can be related to either syntax or logic.
26
Testing and Debugging the Application (cont.)
● Syntax error
○ Occurs when a rule of a programming
language is broken
○ Typos
27
Testing and Debugging the Application (cont.)
● Logic error
○ Occurs when the syntax is correct, but the
outcomes is not what was desired.
○ Causes may include missing instructions,
instructions out of order, or the wrong type of
instruction.
28
Testing and Debugging the Application (cont.)
● Run time error
○ Occurs when an application is running and the
application stops.
29
30
31
32
Assembling the Documentation
● Important documentation
○ Planning tools
○ Printout of the application's interface and
code
33
Assembling the Documentation
● Your planning tools include:
○ TOE chart
○ Sketch of interface
○ Flowcharts and/ or pseudocode
34
35
36
37
Reference
● Book
○ Programming with Microsoft Visual Basic
2010, 5th edition
○ Author: Diane Zak
38
Thanks!
39

More Related Content

What's hot

halstead software science measures
halstead software science measureshalstead software science measures
halstead software science measures
Deepti Pillai
 

What's hot (17)

Object oriented programming 11 preprocessor directives and program structure
Object oriented programming 11 preprocessor directives and program structureObject oriented programming 11 preprocessor directives and program structure
Object oriented programming 11 preprocessor directives and program structure
 
Lesson 4.2 5th and 6th step
Lesson 4.2 5th and 6th stepLesson 4.2 5th and 6th step
Lesson 4.2 5th and 6th step
 
State-Space Realizations Using Control Canonical Form and Simulation Diagram
State-Space Realizations Using Control Canonical Form and Simulation DiagramState-Space Realizations Using Control Canonical Form and Simulation Diagram
State-Space Realizations Using Control Canonical Form and Simulation Diagram
 
halstead software science measures
halstead software science measureshalstead software science measures
halstead software science measures
 
Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
 
source code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniquessource code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniques
 
Verilog operators
Verilog operatorsVerilog operators
Verilog operators
 
Unit 1 psp
Unit 1 pspUnit 1 psp
Unit 1 psp
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test Bench
 
SMU BCA SEM 1 FALL 2016 ASSIGNMENTS
SMU BCA SEM 1 FALL 2016 ASSIGNMENTSSMU BCA SEM 1 FALL 2016 ASSIGNMENTS
SMU BCA SEM 1 FALL 2016 ASSIGNMENTS
 
flowcharts
flowchartsflowcharts
flowcharts
 
Pm0015
Pm0015Pm0015
Pm0015
 
Line Of Code
Line Of CodeLine Of Code
Line Of Code
 
P3
P3P3
P3
 
Proj 420 final exam solution
Proj 420 final exam solutionProj 420 final exam solution
Proj 420 final exam solution
 
Verilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSVerilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONS
 
Sen17513 winter2016-question-paper
Sen17513 winter2016-question-paperSen17513 winter2016-question-paper
Sen17513 winter2016-question-paper
 

Similar to CHAPTER 3 - LESSON C

L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 

Similar to CHAPTER 3 - LESSON C (20)

L1
L1L1
L1
 
Fundamentals of programming with C++
Fundamentals of programming with C++Fundamentals of programming with C++
Fundamentals of programming with C++
 
CHAPTER 1
CHAPTER 1CHAPTER 1
CHAPTER 1
 
chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdf
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
 
lecture 5
 lecture 5 lecture 5
lecture 5
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
Lecture1
Lecture1Lecture1
Lecture1
 
COM1407: Structured Program Development
COM1407: Structured Program Development COM1407: Structured Program Development
COM1407: Structured Program Development
 
Blueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBlueprints: Introduction to Python programming
Blueprints: Introduction to Python programming
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptx
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Chapter 1.ppt
Chapter 1.pptChapter 1.ppt
Chapter 1.ppt
 
Comp102 lec 1
Comp102   lec 1Comp102   lec 1
Comp102 lec 1
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
IEC 61131-3 PLC Programming Languages: Beyond Ladder Logic
IEC 61131-3 PLC Programming Languages:  Beyond Ladder LogicIEC 61131-3 PLC Programming Languages:  Beyond Ladder Logic
IEC 61131-3 PLC Programming Languages: Beyond Ladder Logic
 

More from MLG College of Learning, Inc (20)

PC111.Lesson2
PC111.Lesson2PC111.Lesson2
PC111.Lesson2
 
PC111.Lesson1
PC111.Lesson1PC111.Lesson1
PC111.Lesson1
 
PC111-lesson1.pptx
PC111-lesson1.pptxPC111-lesson1.pptx
PC111-lesson1.pptx
 
PC LEESOON 6.pptx
PC LEESOON 6.pptxPC LEESOON 6.pptx
PC LEESOON 6.pptx
 
PC 106 PPT-09.pptx
PC 106 PPT-09.pptxPC 106 PPT-09.pptx
PC 106 PPT-09.pptx
 
PC 106 PPT-07
PC 106 PPT-07PC 106 PPT-07
PC 106 PPT-07
 
PC 106 PPT-01
PC 106 PPT-01PC 106 PPT-01
PC 106 PPT-01
 
PC 106 PPT-06
PC 106 PPT-06PC 106 PPT-06
PC 106 PPT-06
 
PC 106 PPT-05
PC 106 PPT-05PC 106 PPT-05
PC 106 PPT-05
 
PC 106 Slide 04
PC 106 Slide 04PC 106 Slide 04
PC 106 Slide 04
 
PC 106 Slide no.02
PC 106 Slide no.02PC 106 Slide no.02
PC 106 Slide no.02
 
pc-106-slide-3
pc-106-slide-3pc-106-slide-3
pc-106-slide-3
 
PC 106 Slide 2
PC 106 Slide 2PC 106 Slide 2
PC 106 Slide 2
 
PC 106 Slide 1.pptx
PC 106 Slide 1.pptxPC 106 Slide 1.pptx
PC 106 Slide 1.pptx
 
Db2 characteristics of db ms
Db2 characteristics of db msDb2 characteristics of db ms
Db2 characteristics of db ms
 
Db1 introduction
Db1 introductionDb1 introduction
Db1 introduction
 
Lesson 3.2
Lesson 3.2Lesson 3.2
Lesson 3.2
 
Lesson 3.1
Lesson 3.1Lesson 3.1
Lesson 3.1
 
Lesson 1.6
Lesson 1.6Lesson 1.6
Lesson 1.6
 
Lesson 3.2
Lesson 3.2Lesson 3.2
Lesson 3.2
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Recently uploaded (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

CHAPTER 3 - LESSON C

  • 1. Hello! I am Ma. Wennilou Porazo Instructor 1
  • 3. After studying Lesson C, you should be able to: ● Code ○ Instructions added to an application ● Coding is done after planning and building an interface ● TOE charts ○ show which objects and events need to be coded 3
  • 4. 4
  • 5. 5
  • 6. Coding the Application (cont.) ● Using a Flowchart to Plan a Procedure ● A flowchart shows program logic using standardized symbols ● Oval: Start/Stop Symbols ● Rectangle: Process symbol; represents a task ● Parallelogram: Input/Output symbol ● Flowline connect the symbols ● Flowcharts depict the same logic as pseudocode 6
  • 7. 7
  • 8. ● btnClear control's task ○ Clear the screen for the next order ● String ● Zero-length string (or empty string) ○ A pair of quotation marks with nothing between them ("") 8
  • 9. ● Two ways to remove the control contents at run time: ○ Assign a zero-length string to the Control's Text property 9
  • 10. Assigning a Value to a Property During Run Time ● Assignment statement ○ An instruction assigning a value to an object at run time ● Syntax: object.property=expression ○ object and property are the object and property names 10
  • 11. Coding the btnClear Control’s Click Event Procedure (cont.) ● Using the Focus Method ○ Allows you to move the focus to a specified control during run time ● Syntax: object.Focus() ○ object is the name of the control that receives the focus 11
  • 12. Coding the btnClear Control’s Click Event Procedure (cont.) Internally Documenting the Program Code ● Comments ○ Internal documentation in a program ○ Used by the programmers to document a procedure's purpose or explain section of code ○ Help make code readable 12
  • 13. Coding the btnClear Control’s Click Event Procedure (cont.) ● To create a comment, place an apostrophe(') before a statement ○ The computer ignores all characters after the apostrophe for the rest of the line ● Comments are color-coded in the IDE 13
  • 14. 14
  • 16. Writing Arithmetic Expressions ● Order of operations: ○ PEMDAS(Parentheses, Exponents, Multiplication, Division, Addition, Subtraction) ● Integer division operator ○ Returns a whole number ● Modulus operator ○ Returns the remainder of the division 16
  • 17. 17
  • 18. 18
  • 19. Coding the btnClear Control’s Click Event Procedure (cont.) ● A function is a predefined procedure that performs a task and returns a value ● Val temporarily converts a string to a number and returns the number ● Syntax: Val (string) ● You can use Val to correct calculations in the btnCalc control's Click event procedure 19
  • 20. 20
  • 21. Coding the btnClear Control’s Click Event Procedure (cont.) ● The Format Function ● Improves the appearance of numbers ● Syntax: Format (expression, style) ○ Expression: Specifies the number, date, time or string to format ○ Style: A predefined or user-defined format style 21
  • 22. Coding the btnClear Control’s Click Event Procedure (cont.) ● Currency ○ Example of a format style that displays the number with a dollar sign and two decimal places. 22
  • 23. 23
  • 24. 24
  • 25. Testing and Debugging Application ● Test an application using some sample data ○ Use both valid and invalid data ● Valid data ○ Data that the application is expecting 25
  • 26. Testing and Debugging the Application ● Invalid data ○ Data that the application is not expecting ● Debugging ○ The process of locating and correcting errors in a program. ○ Errors can be related to either syntax or logic. 26
  • 27. Testing and Debugging the Application (cont.) ● Syntax error ○ Occurs when a rule of a programming language is broken ○ Typos 27
  • 28. Testing and Debugging the Application (cont.) ● Logic error ○ Occurs when the syntax is correct, but the outcomes is not what was desired. ○ Causes may include missing instructions, instructions out of order, or the wrong type of instruction. 28
  • 29. Testing and Debugging the Application (cont.) ● Run time error ○ Occurs when an application is running and the application stops. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. Assembling the Documentation ● Important documentation ○ Planning tools ○ Printout of the application's interface and code 33
  • 34. Assembling the Documentation ● Your planning tools include: ○ TOE chart ○ Sketch of interface ○ Flowcharts and/ or pseudocode 34
  • 35. 35
  • 36. 36
  • 37. 37
  • 38. Reference ● Book ○ Programming with Microsoft Visual Basic 2010, 5th edition ○ Author: Diane Zak 38