CISA 1310 Introduction to Computer Programming Logic by yrs83496

VIEWS: 10 PAGES: 30

									CISA 1310
Introduction to Programming Tools

                          Dr. Rick Aukerman, CCP
                          Department of Accounting &
                          Computer Information Systems




             College of Business Administration
              Texas A&M University-Kingsville
Good programmers can rule the kingdom !




                     College of Business Administration
                      Texas A&M University-Kingsville
Introduction to
Structured Design




             College of Business Administration
              Texas A&M University-Kingsville
What is a System?
System – a combination of people,
 equipment and procedures that work
 together to perform a specific function
 Computer based information system –
 some of the procedures are performed
 by a computer




                    College of Business Administration
                     Texas A&M University-Kingsville
System Development Life Cycle


  1. Analyze the current system.
  2. Define the new system
     requirements.
  3. Design the new system.
  4. Develop the new system.
  5. Implement the new system.
  6. Evaluate the new system.


                     College of Business Administration
                      Texas A&M University-Kingsville
1. Analyze the current
system
Done by systems analyst
Users
  Subject Matter experts




                   College of Business Administration
                    Texas A&M University-Kingsville
2. Define the system requirements

Specify what needs to be done
  – Input and output requirements
  – Storage requirements
  – Processing requirements




                        College of Business Administration
                         Texas A&M University-Kingsville
3. Design the new system
 Shape the requirements into a system
 Done by a System Designer
 Uses a variety of tools
   CASE: Computer Assisted Software Engineering
      – Automated tools to assist in design
   System Flowchart:
    - A graphical representation of the programs within a system
     and how they interrelate.




                                   College of Business Administration
                                    Texas A&M University-Kingsville
4. Develop the new system


 System is developed during this
  phase by the programmer or
  programming team
  Major component is the:
    Program Development Cycle -
    PDC

                  College of Business Administration
                   Texas A&M University-Kingsville
PDC

  Step 1: Review the input,
  processing, output and storage
  requirements.
       No Assumptions
       UNDERSTAND THE PROBLEM.




                     College of Business Administration
                      Texas A&M University-Kingsville
PDC

  Step 2: Develop the logic for the
  program
       Program Flowchart
       Pseudocode
       Hierarchy chart
       Modularization
       Procedure Oriented Design
       Object Oriented Design


                          College of Business Administration
                           Texas A&M University-Kingsville
Primary Flowchart Symbols
    Terminal



               Input/
               Output




                        Processing




                                             Decision




                                                                   On-page
                                                                  reference




                             College of Business Administration
                              Texas A&M University-Kingsville
Problem. . .

 We wish to read an employee’s
  payroll data, determine the gross
  pay, calculate the deductions,
  determine the net pay, and issue an
  appropriate pay check.




                    College of Business Administration
                     Texas A&M University-Kingsville
Program Flowchart and Pseudocode


                                                                This is the
                                                               pseudocode
      This is
       the
    flowchart




                          College of Business Administration
                           Texas A&M University-Kingsville
Modularization



                                                                 Each
                                                                module
                                                                 has a
                                                                single
                                                                 entry
                                                                 and a
                                                                single
                                                                  exit
                                                                 point
      Each
     module       Each
   performs a   module
     single         is
    function     clearly
                labeled



                           College of Business Administration
                            Texas A&M University-Kingsville
PDC Continued

  Step 3: Write the program using a programming
  language, i.e., convert the design into a series
  of programming steps.
         Procedure Oriented Language - How
             Pascal, Cobol, Assembler, Fortran, etc

         Fourth Generation Language - What
             database, spreadsheets, word processors, etc
         Event Driven Programming - Event Response
             Visual Basic, Visual C++, etc
         Object Oriented Programming - Classes and Objects
             Java, C++, etc


                               College of Business Administration
                                Texas A&M University-Kingsville
PDC Continued

 Step 4: Test and debug the program
      The process of resolving problems in the
       program
      Two Major kinds of errors
         Syntax
         Logic
      Unit testing
      Systems testing or Integration testing



                        College of Business Administration
                         Texas A&M University-Kingsville
PDC Continued

 Step 5: Complete the program
   documentation
       Extremely important
       Should be an on-going process
       Pull it all together
       Document for the Programmer that
       follows you




                      College of Business Administration
                       Texas A&M University-Kingsville
5. Implement the new
system

      Provide user training
      Develop operating procedures
      Decide upon implementation
      strategy




                    College of Business Administration
                     Texas A&M University-Kingsville
7. Evaluate the new system

      Run system and determine if it is
      doing what it is supposed to do
      Modify as necessary
      Prepare report




                     College of Business Administration
                      Texas A&M University-Kingsville
Structured Programming

  A way of programming that uses
  only three basic patterns of logic
  Referred to as control structures
  Basic control structures
   – Simple sequence control structure
   – IFTHENELSE control structure
      • Selection
   – DOWHILE control structure
      • Iteration

                    College of Business Administration
                     Texas A&M University-Kingsville
          A Series of Steps
1. Proceed North on Western Street for
  two miles.
2. Turn East on University Avenue.
3. Proceed on University Avenue for
  three blocks, to Washington Street.
4. Turn North at Washington Street.
5. Proceed two blocks.
6. House is on the left (1600 Washington
  Street)
                   College of Business Administration
                    Texas A&M University-Kingsville
Simple Sequence




            College of Business Administration
             Texas A&M University-Kingsville
                   A Decision
1. Proceed North on Western Street for two miles.
2. Turn East on University Avenue.
3. Proceed on University Avenue for three blocks, to
   Washington Street.
4. IF North turn at Washington Street is blocked
  THEN
      Continue East on University Avenue five blocks.
      Turn North at Clifton Avenue.
      Proceed three blocks.
      Turn West at Circle Drive.
      Proceed five blocks.
      Turn South at Washington Street.
      House is on the right (1600 Washington Street).
   ELSE
      Turn North at Washington Street.
      Proceed two blocks.
      House is on the left (1600 Washington Street)
                                College of Business Administration
                                 Texas A&M University-Kingsville
IFTHENELSE Structure




            College of Business Administration
             Texas A&M University-Kingsville
A Repetition


Wash hair
Rinse
Repeat


         College of Business Administration
          Texas A&M University-Kingsville
  A Repetition


1. Wash hair
2. Rinse hair
3. Repeat from Step 1
  – Infinite Loop




              College of Business Administration
               Texas A&M University-Kingsville
DOWHILE Loop

   DOWHILE hair is not clean
    Wash hair
    Rinse hair
   ENDDO         • Loop



                  College of Business Administration
                   Texas A&M University-Kingsville
DOWHILE Structure




            College of Business Administration
             Texas A&M University-Kingsville
That’s all, folks!


         College of Business Administration
          Texas A&M University-Kingsville

								
To top