SlideShare a Scribd company logo
1 of 21
Software Development
Fundamentals
Susan Winters
Software Development
 Application Life-Cycle Management
 Application Specifications
 Computer Storage
 Data Structures
 Algorithms
 Decision Making
 Repetition
Application Life-Cycle Development
 Envision – I want a program that will do this and that
 Requirements – This is what the program must do and include; document it!
 Design – site architecture – story boards – dictate the flow - mockups
 Development – coders writes out technical specs – what technologies will be used, etc.
 Test – “unit testing” – test code snippets. “Full testing” – does the program do what its supposed to
do? UAT – User Acceptance Testing – users play with software to test if it works for users. User
friendly?
 Deploy – move from development to production – out to the public
 Maintain – fixing bugs found after launch. “patches”, enhancements, etc.
Computer Storage & Processing
 Understanding computer storage helps you understand why we
use data types and why there are restrictions on those data
types.
 Computers deal with BINARY concepts (off/on)
 Bit 0 or 1 (off/on)
 Bytes - groups of bits
 Computer Memory – we can only load a finite amount of data
into the computer at one time.
 ASCII chart – a way to represent special characters in binary
How the computer understands code
 Programming Languages allow you to write your programs in an English style syntax to represent
data and instructions that is then compiled and exports that code into a binary version of
instructions that the computer understands.
 Don’t worry about how the compiler takes care of this translation.
 Specific computer platforms have specific processing sets so inside the CPU the computer will know
how to process the instructions.
 Instruction sets and compilers
Variables
 Provides a temporary, named storage location in memory that
you’ll refer to in your code to access the data in storage
 Name Storage locations that we refer to in our code that will be
mapped to these memory locations
 You can change the values assigned to the variable
 Variables are just holders of data you want to store in memory and
can access later when needed.
Constants
 Constants like variables hold in memory data that you can retrieve later however you can not
change the value of them.
 Example:
_______________ (list price) x 8.25% (sales tax) = ______________ (total price)
A programmer can put the tax rate into a program and do calculations based on the other variables in
the calculation but the tax rate is never changed while the program is running. It remains constant.
Data Types
Data Type Range Description
byte 0 to 255 A single byte (8 bits)
char Any Unicode character Characters used in most languages in the
world
short -32,768 to 32,767 Signed integer values
int -2,147,483,648 to 2,147,483,647 Larger signed integer values
long 9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
Even larger signed integer values
float +/- 1.5 x 10-45 to +/- -3.4 x 1038 Floating point signed values
double +/- 5.0e-324 to +/- 1.7e308 Large floating point signed values
string String of characters Words, sentences, phrases, etc.
boolean True or False Represents true or false, 1 or 0
Data Structure Types
 Arrays
 Stacks
 Queues
 Dictionaries
- Data structures are represented by a variable
Arrays
 An array is a group / collection of similar data types.
 Arrays are designed to store the same data type
 A collection of string values or a collection of number values
 Random access data structure
 Accessed thru indexes; Access any value in any order by using the index value.
 Index numbers starts with Zero not One!
 In the photo above you see a collection of brick toys.
 Some bricks are the same color, some have the same number of pegs – but they are all the same type of toy
so they can be placed in an array. (abstract)
 Imagine each brick had its own serial number
 You could pick out a specific individual brick by its serial number (ie. Index number assigned by a
programmer).
Stacks
 A collection of objects, accessed by pop and push.
 To the right you see a stack of books.
 You “push” a book down on top of the stack of existing books.
 To get a book, you must “pop” the books off of the stack one at a time starting with the one on top.
 First in, Last out
Queue
 A collection of objects, accessed by queuing and de-queuing.
 Similar to people standing in line.
 You add another person to the que (line) with “en-queue” and you
get a person out of line (the person in the first position) with “de-
queue”
 Each object (person) in the collection (line) is processed in the order
in which they got into the collection (line).
 First in, First out.
Dictionary
Key Value
Key1 First item
Key2 Second item
Key3 Third item
 A collection of objects that are
accessed by using a key.
 Looks similar to an array.
Key Value
firstName Susan
lastName Winters
eyeColor hazel
Algorithms
 A set of instructions – a solution to a problem
 They can be “recipes”, mathematical calculations or
other formulas
 Think logically of how to solve a problem / accomplish
a goal
 Visualize your algorithms in a flow chart before you
start coding so that you can catch “bugs” in your code.
Decision Structures
 Your code will always be asking questions
 Is x > y? (mathematical yes or no)
 Is eyColor = “hazel”? (exact match)
 Which color is most desirable?
Red, Orange or Blue? (select one)
 If, if-else, if-else-if
 Switch or Select Case
 You can change the flow of your program code based on
the outcome of a decision structure.
X
Red Blue
Color?
Y>
Orange
Repetition
 Keep doing something – until I tell you to stop.
 For loops
 While loops
 Do-while loops
 Recursion
 Use a counter – (“i” or other variable name) to represent the number of times your code has looped.)
 An “infinite loop” is one that never ends. Don’t do that! You’ll eventually run out of memory and crash the
application and the computer will quit processing.
For Loops
for(int myCounter = 0; myCounter < 10; myCounter++)
{
//do something
}
For each value in this range that I’m working with – do something;
Check to see if the number of times I’ve done something is less than 10;
Add 1 to the counter after each time something has been done.
(“in this range” is 10 in this scenario – This is the condition you are checking).
While Loops
while (myCounter < 10)
{
//do something
console.write(“Counter is at” + myCounter);
// increment the counter here
myCounter++;
}
While my condition is true – do something;
Then increment my counter.
(“my condition” in this scenario is the counter being less than 10).
Do-While Loops
myCounter = 1;
do
{
//something
console.write(“hello”);
// increment the counter here
myCounter++;
}
while (myCounter < 5);
Do this – (at least once) and then increment myCounter.
Then keep doing it while myCounter < 5.
(“my condition” to continuing to do something after the first time - in this scenario - is the myCounter being
less than 5).
Recursive
long value = Factorial(5);
console.writeLine(value);
static long Factorial(int x)
{ if (z ==0) {return 1;}
return z * Factorial(z – 1)
Factorial means – I’m going to take a range of values and multiply them together.
You tell the Factorial function what the highest number in the range is (in this scenario it’s 5).
So your answer would be 1 x 2 x 3 x 4 x 5 = 120
This information can be used to
help you pass the Microsoft Exam
98-361
Susan Winters

More Related Content

Similar to Software fundamentals

Comp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codeComp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codepradesigali1
 
Introduction To Programming
Introduction To ProgrammingIntroduction To Programming
Introduction To Programmingcwarren
 
Lecture 01-2.ppt
Lecture 01-2.pptLecture 01-2.ppt
Lecture 01-2.pptRaoHamza24
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basicsrobertbenard
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basicsrobertbenard
 
Introduction to programming - class 2
Introduction to programming - class 2Introduction to programming - class 2
Introduction to programming - class 2Paul Brebner
 
Automating With Excel An Object Oriented Approach
Automating  With  Excel    An  Object  Oriented  ApproachAutomating  With  Excel    An  Object  Oriented  Approach
Automating With Excel An Object Oriented ApproachRazorleaf Corporation
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review GuideBenjamin Kissinger
 
End-to-End Machine Learning Project
End-to-End Machine Learning ProjectEnd-to-End Machine Learning Project
End-to-End Machine Learning ProjectEng Teong Cheah
 
Generating test data for Statistical and ML models
Generating test data for Statistical and ML modelsGenerating test data for Statistical and ML models
Generating test data for Statistical and ML modelsVladimir Ulogov
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptxSayanSen36
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0Aarti P
 
How to understand and implement regression analysis
How to understand and implement regression analysisHow to understand and implement regression analysis
How to understand and implement regression analysisClaireWhittaker5
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and reviewAbdullah Al-hazmy
 
lec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptlec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptMard Geer
 
lec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptlec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptSourabhPal46
 
Spreadsheets for developers
Spreadsheets for developersSpreadsheets for developers
Spreadsheets for developersFelienne Hermans
 
Fitnesse Testing Framework
Fitnesse Testing Framework Fitnesse Testing Framework
Fitnesse Testing Framework Ajit Koti
 

Similar to Software fundamentals (20)

Comp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codeComp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source code
 
Introduction To Programming
Introduction To ProgrammingIntroduction To Programming
Introduction To Programming
 
Lecture 01-2.ppt
Lecture 01-2.pptLecture 01-2.ppt
Lecture 01-2.ppt
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
 
Introduction to programming - class 2
Introduction to programming - class 2Introduction to programming - class 2
Introduction to programming - class 2
 
Automating With Excel An Object Oriented Approach
Automating  With  Excel    An  Object  Oriented  ApproachAutomating  With  Excel    An  Object  Oriented  Approach
Automating With Excel An Object Oriented Approach
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review Guide
 
End-to-End Machine Learning Project
End-to-End Machine Learning ProjectEnd-to-End Machine Learning Project
End-to-End Machine Learning Project
 
Generating test data for Statistical and ML models
Generating test data for Statistical and ML modelsGenerating test data for Statistical and ML models
Generating test data for Statistical and ML models
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptx
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
How to understand and implement regression analysis
How to understand and implement regression analysisHow to understand and implement regression analysis
How to understand and implement regression analysis
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
 
lec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptlec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.ppt
 
lec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.pptlec_4_data_structures_and_algorithm_analysis.ppt
lec_4_data_structures_and_algorithm_analysis.ppt
 
Sharbani bhattacharya VB Structures
Sharbani bhattacharya VB StructuresSharbani bhattacharya VB Structures
Sharbani bhattacharya VB Structures
 
Spreadsheets for developers
Spreadsheets for developersSpreadsheets for developers
Spreadsheets for developers
 
Fitnesse Testing Framework
Fitnesse Testing Framework Fitnesse Testing Framework
Fitnesse Testing Framework
 
Computation Chapter 4
Computation Chapter 4Computation Chapter 4
Computation Chapter 4
 

Recently uploaded

Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 

Recently uploaded (20)

Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 

Software fundamentals

  • 2. Software Development  Application Life-Cycle Management  Application Specifications  Computer Storage  Data Structures  Algorithms  Decision Making  Repetition
  • 3. Application Life-Cycle Development  Envision – I want a program that will do this and that  Requirements – This is what the program must do and include; document it!  Design – site architecture – story boards – dictate the flow - mockups  Development – coders writes out technical specs – what technologies will be used, etc.  Test – “unit testing” – test code snippets. “Full testing” – does the program do what its supposed to do? UAT – User Acceptance Testing – users play with software to test if it works for users. User friendly?  Deploy – move from development to production – out to the public  Maintain – fixing bugs found after launch. “patches”, enhancements, etc.
  • 4. Computer Storage & Processing  Understanding computer storage helps you understand why we use data types and why there are restrictions on those data types.  Computers deal with BINARY concepts (off/on)  Bit 0 or 1 (off/on)  Bytes - groups of bits  Computer Memory – we can only load a finite amount of data into the computer at one time.  ASCII chart – a way to represent special characters in binary
  • 5. How the computer understands code  Programming Languages allow you to write your programs in an English style syntax to represent data and instructions that is then compiled and exports that code into a binary version of instructions that the computer understands.  Don’t worry about how the compiler takes care of this translation.  Specific computer platforms have specific processing sets so inside the CPU the computer will know how to process the instructions.  Instruction sets and compilers
  • 6. Variables  Provides a temporary, named storage location in memory that you’ll refer to in your code to access the data in storage  Name Storage locations that we refer to in our code that will be mapped to these memory locations  You can change the values assigned to the variable  Variables are just holders of data you want to store in memory and can access later when needed.
  • 7. Constants  Constants like variables hold in memory data that you can retrieve later however you can not change the value of them.  Example: _______________ (list price) x 8.25% (sales tax) = ______________ (total price) A programmer can put the tax rate into a program and do calculations based on the other variables in the calculation but the tax rate is never changed while the program is running. It remains constant.
  • 8. Data Types Data Type Range Description byte 0 to 255 A single byte (8 bits) char Any Unicode character Characters used in most languages in the world short -32,768 to 32,767 Signed integer values int -2,147,483,648 to 2,147,483,647 Larger signed integer values long 9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Even larger signed integer values float +/- 1.5 x 10-45 to +/- -3.4 x 1038 Floating point signed values double +/- 5.0e-324 to +/- 1.7e308 Large floating point signed values string String of characters Words, sentences, phrases, etc. boolean True or False Represents true or false, 1 or 0
  • 9. Data Structure Types  Arrays  Stacks  Queues  Dictionaries - Data structures are represented by a variable
  • 10. Arrays  An array is a group / collection of similar data types.  Arrays are designed to store the same data type  A collection of string values or a collection of number values  Random access data structure  Accessed thru indexes; Access any value in any order by using the index value.  Index numbers starts with Zero not One!  In the photo above you see a collection of brick toys.  Some bricks are the same color, some have the same number of pegs – but they are all the same type of toy so they can be placed in an array. (abstract)  Imagine each brick had its own serial number  You could pick out a specific individual brick by its serial number (ie. Index number assigned by a programmer).
  • 11. Stacks  A collection of objects, accessed by pop and push.  To the right you see a stack of books.  You “push” a book down on top of the stack of existing books.  To get a book, you must “pop” the books off of the stack one at a time starting with the one on top.  First in, Last out
  • 12. Queue  A collection of objects, accessed by queuing and de-queuing.  Similar to people standing in line.  You add another person to the que (line) with “en-queue” and you get a person out of line (the person in the first position) with “de- queue”  Each object (person) in the collection (line) is processed in the order in which they got into the collection (line).  First in, First out.
  • 13. Dictionary Key Value Key1 First item Key2 Second item Key3 Third item  A collection of objects that are accessed by using a key.  Looks similar to an array. Key Value firstName Susan lastName Winters eyeColor hazel
  • 14. Algorithms  A set of instructions – a solution to a problem  They can be “recipes”, mathematical calculations or other formulas  Think logically of how to solve a problem / accomplish a goal  Visualize your algorithms in a flow chart before you start coding so that you can catch “bugs” in your code.
  • 15. Decision Structures  Your code will always be asking questions  Is x > y? (mathematical yes or no)  Is eyColor = “hazel”? (exact match)  Which color is most desirable? Red, Orange or Blue? (select one)  If, if-else, if-else-if  Switch or Select Case  You can change the flow of your program code based on the outcome of a decision structure. X Red Blue Color? Y> Orange
  • 16. Repetition  Keep doing something – until I tell you to stop.  For loops  While loops  Do-while loops  Recursion  Use a counter – (“i” or other variable name) to represent the number of times your code has looped.)  An “infinite loop” is one that never ends. Don’t do that! You’ll eventually run out of memory and crash the application and the computer will quit processing.
  • 17. For Loops for(int myCounter = 0; myCounter < 10; myCounter++) { //do something } For each value in this range that I’m working with – do something; Check to see if the number of times I’ve done something is less than 10; Add 1 to the counter after each time something has been done. (“in this range” is 10 in this scenario – This is the condition you are checking).
  • 18. While Loops while (myCounter < 10) { //do something console.write(“Counter is at” + myCounter); // increment the counter here myCounter++; } While my condition is true – do something; Then increment my counter. (“my condition” in this scenario is the counter being less than 10).
  • 19. Do-While Loops myCounter = 1; do { //something console.write(“hello”); // increment the counter here myCounter++; } while (myCounter < 5); Do this – (at least once) and then increment myCounter. Then keep doing it while myCounter < 5. (“my condition” to continuing to do something after the first time - in this scenario - is the myCounter being less than 5).
  • 20. Recursive long value = Factorial(5); console.writeLine(value); static long Factorial(int x) { if (z ==0) {return 1;} return z * Factorial(z – 1) Factorial means – I’m going to take a range of values and multiply them together. You tell the Factorial function what the highest number in the range is (in this scenario it’s 5). So your answer would be 1 x 2 x 3 x 4 x 5 = 120
  • 21. This information can be used to help you pass the Microsoft Exam 98-361 Susan Winters