SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
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

Weitere Àhnliche Inhalte

Was ist angesagt?

Tacit knowledge
Tacit knowledgeTacit knowledge
Tacit knowledgeUA Fort Smith
 
Use of BIM in planning and construction and implementation in real project
Use of BIM in planning and construction and implementation in real projectUse of BIM in planning and construction and implementation in real project
Use of BIM in planning and construction and implementation in real projectMANNU KUMAR
 
BIG BIM little bim for Estimators - 50 Slides
BIG BIM little bim for Estimators - 50 SlidesBIG BIM little bim for Estimators - 50 Slides
BIG BIM little bim for Estimators - 50 SlidesMike Bordenaro
 
BIM - Building Information Modelling
BIM - Building Information ModellingBIM - Building Information Modelling
BIM - Building Information ModellingFARO_Europe
 
BIM process adoption for integrated design and constuction
BIM process adoption for integrated design and constuctionBIM process adoption for integrated design and constuction
BIM process adoption for integrated design and constuctionReshma Philip
 
Business Analysis Techniques
Business Analysis TechniquesBusiness Analysis Techniques
Business Analysis TechniquesIIBA UK Chapter
 
Gridcomputingppt
GridcomputingpptGridcomputingppt
Gridcomputingpptnavjasser
 
Knowledge Management System & Technology
Knowledge Management System & TechnologyKnowledge Management System & Technology
Knowledge Management System & TechnologyElijah Ezendu
 
Knowledge management
Knowledge management Knowledge management
Knowledge management Puja Shrivastav
 
Management Information System (Full Notes)
Management Information System (Full Notes)Management Information System (Full Notes)
Management Information System (Full Notes)Harish Chand
 

Was ist angesagt? (12)

Tacit knowledge
Tacit knowledgeTacit knowledge
Tacit knowledge
 
Use of BIM in planning and construction and implementation in real project
Use of BIM in planning and construction and implementation in real projectUse of BIM in planning and construction and implementation in real project
Use of BIM in planning and construction and implementation in real project
 
BIG BIM little bim for Estimators - 50 Slides
BIG BIM little bim for Estimators - 50 SlidesBIG BIM little bim for Estimators - 50 Slides
BIG BIM little bim for Estimators - 50 Slides
 
BIM - Building Information Modelling
BIM - Building Information ModellingBIM - Building Information Modelling
BIM - Building Information Modelling
 
BIM process adoption for integrated design and constuction
BIM process adoption for integrated design and constuctionBIM process adoption for integrated design and constuction
BIM process adoption for integrated design and constuction
 
INFORMATION TECHNOLOGY FOR BUSINESS
INFORMATION TECHNOLOGY FOR BUSINESSINFORMATION TECHNOLOGY FOR BUSINESS
INFORMATION TECHNOLOGY FOR BUSINESS
 
Business Analysis Techniques
Business Analysis TechniquesBusiness Analysis Techniques
Business Analysis Techniques
 
BIM awareness
BIM awarenessBIM awareness
BIM awareness
 
Gridcomputingppt
GridcomputingpptGridcomputingppt
Gridcomputingppt
 
Knowledge Management System & Technology
Knowledge Management System & TechnologyKnowledge Management System & Technology
Knowledge Management System & Technology
 
Knowledge management
Knowledge management Knowledge management
Knowledge management
 
Management Information System (Full Notes)
Management Information System (Full Notes)Management Information System (Full Notes)
Management Information System (Full Notes)
 

Andere mochten auch

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
 
6 problem solving with decisions
6 problem solving with decisions6 problem solving with decisions
6 problem solving with decisionsRheigh 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
 

Andere mochten auch (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
 

Mehr von 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
 

KĂŒrzlich hochgeladen

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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

KĂŒrzlich hochgeladen (20)

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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.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