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.pptSourabhPal46
 
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
 
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

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

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