SlideShare una empresa de Scribd logo
1 de 3
Descargar para leer sin conexión
Data Structures and Algorithms




      The Case Logic
      Structure

 @ The case logic structure is made up of several or
      many sets of instructions, only one of which will
      be selected by the user and executed by the
      programmer.

 @ The form of the case logic structure is the
      following:

     CASE OF VARIABLE
                = constant 1:
                actions for VARIABLE             = constant 1
                = constant 2:
                actions for VARIABLE             = constant 2
                = constant 3:
                actions for VARIABLE             = constant 3
                .
                .
                OTHERWISE
                actions for VARIABLE             = anything
                                                   else
     END-OF-CASE

Problem Solving with the Case Logic Structure                  *Property of STI
                                                                   Page 1 of 3
Data Structures and Algorithms




      The Case Logic
      Structure


Flowchart Diagram for the Case Logic Structure

                                                   A



                                                CASE OF
                                                VARIABLE



       = Constant 1             = Constant 2               = Constant 3       OTHERWISE




      INSTRUCTIONS             INSTRUCTIONS            INSTRUCTIONS        INSTRUCTIONS




                                                   B




Problem Solving with the Case Logic Structure                                            *Property of STI
                                                                                             Page 2 of 3
Data Structures and Algorithms




      The Case Logic
      Structure
                                                                             A



        C1 = Constant 1
                                                                     F                   T
        C2 = Constant 2                                                  IF V = C1



        C3 = Constant 3
                                                  F                      T
                                                         IF V = C2
        C4 = Constant 4                                                                  INSTRUCTIONS
                                                                                           FOR v = C1


                                  F                      T
                                           IF V = C3
                                                                         INSTRUCTIONS
                                                                           FOR v = C2


                    F                     T
                           IF V = C4
                                                         INSTRUCTIONS
                                                           FOR v = C3




           INSTRUCTIONS                   INSTRUCTIONS
             FOR v = C4                     FOR v = C4




Codes                                                                                B




      @ Codes are characters, character strings, numbers, or
        some combination of these types of data that a
        programmer uses to name the options, the constants
        in a case structure.
Problem Solving with the Case Logic Structure                                                   *Property of STI
                                                                                                    Page 3 of 3

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Engineering Economics Paper solution
Engineering Economics Paper solutionEngineering Economics Paper solution
Engineering Economics Paper solution
 
Intellectual Property Rights presentation
Intellectual Property Rights presentationIntellectual Property Rights presentation
Intellectual Property Rights presentation
 
Trade secrets
Trade secretsTrade secrets
Trade secrets
 
Industrial design
Industrial designIndustrial design
Industrial design
 
Cybercrime and security
Cybercrime and securityCybercrime and security
Cybercrime and security
 
Copyright Infringment
Copyright InfringmentCopyright Infringment
Copyright Infringment
 
Cyber law
Cyber lawCyber law
Cyber law
 
Cyber Crime
Cyber CrimeCyber Crime
Cyber Crime
 
Agricultural engineering
Agricultural engineeringAgricultural engineering
Agricultural engineering
 
Cyber law & Intellectual property issues
Cyber law & Intellectual property issuesCyber law & Intellectual property issues
Cyber law & Intellectual property issues
 
Trap crops in pest management
Trap crops in pest managementTrap crops in pest management
Trap crops in pest management
 
Unfair competition
Unfair competitionUnfair competition
Unfair competition
 
Industrial_design
Industrial_designIndustrial_design
Industrial_design
 
intellectual Property Rights [Industrial design]
intellectual Property Rights  [Industrial design]intellectual Property Rights  [Industrial design]
intellectual Property Rights [Industrial design]
 
THE ROLE OF ENGINEER in Agricultural & FS Sector
THE ROLE OF ENGINEER in Agricultural & FS SectorTHE ROLE OF ENGINEER in Agricultural & FS Sector
THE ROLE OF ENGINEER in Agricultural & FS Sector
 
Ethics in computing
Ethics in computingEthics in computing
Ethics in computing
 
Patent
PatentPatent
Patent
 
Importance of farm machineries and power.pdf
Importance of farm machineries and power.pdfImportance of farm machineries and power.pdf
Importance of farm machineries and power.pdf
 
Cyber crime ppt
Cyber crime pptCyber crime ppt
Cyber crime ppt
 
IT Act 2000 Penalties, Offences with case studies
IT Act 2000 Penalties, Offences with case studies IT Act 2000 Penalties, Offences with case studies
IT Act 2000 Penalties, Offences with case studies
 

Destacado

5 problem solving with the sequential logic structure
5 problem solving with the sequential logic structure5 problem solving with the sequential logic structure
5 problem solving with the sequential logic structureRheigh Henley Calderon
 
Algorithm Designs - Control Structures
Algorithm Designs - Control StructuresAlgorithm Designs - Control Structures
Algorithm Designs - Control Structureshatredai
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
1 introduction to problem solving and programming
1 introduction to problem solving and programming1 introduction to problem solving and programming
1 introduction to problem solving and programmingRheigh Henley Calderon
 

Destacado (6)

5 problem solving with the sequential logic structure
5 problem solving with the sequential logic structure5 problem solving with the sequential logic structure
5 problem solving with the sequential logic structure
 
6 problem solving with decisions
6 problem solving with decisions6 problem solving with decisions
6 problem solving with decisions
 
Algorithm Designs - Control Structures
Algorithm Designs - Control StructuresAlgorithm Designs - Control Structures
Algorithm Designs - Control Structures
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
1 introduction to problem solving and programming
1 introduction to problem solving and programming1 introduction to problem solving and programming
1 introduction to problem solving and programming
 
7 problem solving with loops
7 problem solving with loops7 problem solving with loops
7 problem solving with loops
 

Más de Rheigh Henley Calderon (20)

10 data structures
10 data structures10 data structures
10 data structures
 
9 processing arrays
9 processing arrays9 processing arrays
9 processing arrays
 
4 introduction to programming structure
4 introduction to programming structure4 introduction to programming structure
4 introduction to programming structure
 
3 programming concepts
3 programming concepts3 programming concepts
3 programming concepts
 
2 beginning problem solving concepts for the computer
2 beginning problem solving concepts for the computer2 beginning problem solving concepts for the computer
2 beginning problem solving concepts for the computer
 
9 technical support
9 technical support9 technical support
9 technical support
 
8 customer service
8 customer service8 customer service
8 customer service
 
7 laptop repair
7 laptop repair7 laptop repair
7 laptop repair
 
6 laptop basics
6 laptop basics6 laptop basics
6 laptop basics
 
5 pc maintenance
5 pc maintenance5 pc maintenance
5 pc maintenance
 
4 pc repair
4 pc repair4 pc repair
4 pc repair
 
3 pc upgrade
3 pc upgrade3 pc upgrade
3 pc upgrade
 
2 pc assembly
2 pc assembly2 pc assembly
2 pc assembly
 
1 hardware fundamentals
1 hardware fundamentals1 hardware fundamentals
1 hardware fundamentals
 
8 cyber crimes
8 cyber crimes8 cyber crimes
8 cyber crimes
 
7 computer ethics
7 computer ethics7 computer ethics
7 computer ethics
 
6 professional ethics
6 professional ethics6 professional ethics
6 professional ethics
 
5 business ethics
5 business ethics5 business ethics
5 business ethics
 
4 human relation
4 human relation4 human relation
4 human relation
 
2 morality
2 morality2 morality
2 morality
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

8 problem solving with the case logic structure

  • 1. Data Structures and Algorithms The Case Logic Structure @ The case logic structure is made up of several or many sets of instructions, only one of which will be selected by the user and executed by the programmer. @ The form of the case logic structure is the following: CASE OF VARIABLE = constant 1: actions for VARIABLE = constant 1 = constant 2: actions for VARIABLE = constant 2 = constant 3: actions for VARIABLE = constant 3 . . OTHERWISE actions for VARIABLE = anything else END-OF-CASE Problem Solving with the Case Logic Structure *Property of STI Page 1 of 3
  • 2. Data Structures and Algorithms The Case Logic Structure Flowchart Diagram for the Case Logic Structure A CASE OF VARIABLE = Constant 1 = Constant 2 = Constant 3 OTHERWISE INSTRUCTIONS INSTRUCTIONS INSTRUCTIONS INSTRUCTIONS B Problem Solving with the Case Logic Structure *Property of STI Page 2 of 3
  • 3. Data Structures and Algorithms The Case Logic Structure A C1 = Constant 1 F T C2 = Constant 2 IF V = C1 C3 = Constant 3 F T IF V = C2 C4 = Constant 4 INSTRUCTIONS FOR v = C1 F T IF V = C3 INSTRUCTIONS FOR v = C2 F T IF V = C4 INSTRUCTIONS FOR v = C3 INSTRUCTIONS INSTRUCTIONS FOR v = C4 FOR v = C4 Codes B @ Codes are characters, character strings, numbers, or some combination of these types of data that a programmer uses to name the options, the constants in a case structure. Problem Solving with the Case Logic Structure *Property of STI Page 3 of 3