Wednesday, November 21, 2007

Introduction to Computer


What are computers?

  • Problem solving tools that:
    1.Accept data
    2.Process data
    3.Store data
    4.Present results


  • Why is a computer so powerful?
    1.Speed
    2.Accuracy (GIGO)
    3.Reliability
    4.Storage
    5.Communications

    What is Computing Literacy?
  • Learning how to use computer to benefit your life or work.
  • Required by most occupations.


  • Functions of a Computer
    1.Arithmetic - add, subtract, multiply, divide
    2.Comparisons - greater than, less than, equal
    3.Storage and retrieval

    What Computers Can Do?
    1.Data processing
    2.Control
    3.Design and Development
    4.Data Communication

    What Computers Cannot Do?
    1.Cannot identify a problem to be solved.
    2.Cannot identify and collect data.
    3.Cannot design software.
    4.Cannot identify the output needed to solve a problem.
    5.Cannot interpret and use information to solve a problem.

    Elements of an Information System
    1.Hardware
    2.Software
    3.Data
    4.People
    5.Procedures

    Hardware
  • Equipment associated with computer
    1.System unit
    2.Communication device
    3.Storage
    4.Input devices
    5.Output devices

    Example
    Keyboard, monitor, speaker


  • Software
    • Set of instructions that a computer understand (program)
    • Types of software
      • Application softwar
      • System software


    Application software
    Programs designed to perform specific tasks for users.
    1.Packaged software
    2.Custom software
    3.Shareware (distributed free for a trial period)
    4.Freeware (copyright)
    5.Public domain software

    System Software
    Interface = Programs that control the operations of the computer and its devices.
    • Operating system
      • Instructions that coordinate activities of hardware devices
      • Instruction to run application software
    • Utility programs
      • Perform a specific task.
      • Uninstaller, anti virus.


    User Interface
  • Controls how data and instructions are entered and how information is presented in the screen.
  • GUI allows interaction between users and software using visual images such as icons or button.


  • Software Development
    1.Computer programmers
    2.System analyst
    3.Programming language

    Users
    5 categories of computer users:
    1.Home Users
    2.Mobile Users
    3.Large Business Users
    4.Small Office/Home Office Users
    5.Power Users

    Common Computer Hardware Components - Monitor
  • Output device
  • Also called VDU (visual display unit).


  • Common Computer Hardware Components - Keyboard and Mouse

    Common Computer Hardware Components - System Unit


    Common Computer Hardware Components - Printer
  • Output device


  • Common Computer Hardware Components - Speaker and modem

  • SPEAKER


  • MODEM


  • Categories of Computer
  • Personal Computer ( Microcomputer)
  • Handheld Computer
  • Internet Appliance
  • Mid Range Server
  • Mainframe
  • Supercomputers


  • Personal Computer (Microcomputer)
    Types:
    1.Desktop
  • 2 most popular series : IBM compatible and Apple Macintosh
    2.laptop/notebook
  • Portable, small enough to fit on your lap
  • Generally more expensive than a desktop computer


  • Handheld Computer
    • Small computer that fits in your hand
    • Also called a palmtop or pocket computer
    • How do you input data with a handheld computer?
      • Stylus
      • Speech recognition
      • Handwriting recognitionld computer?
    What is a personal digital assistant (PDA)?
  • Provides personal organizer functions
  • 1.Calendar
    2.Appointment book
    3.Address book
    4.Calculator
    5.Notepad

    Internet Appliance



    What is an Internet appliance?
  • Computer whose main purpose is to connect to Internet from home.
  • Web TV is one example.








  • Mid Range Server
    • Use in medium-sized organizations
    • Cheaper than mainframe
    • Process faster than microcomputer
    • When it is uneconomical to use mainframes.
    • Organizations that use minicomputer:
      • Airlines
      • Domestic Banks
    • Examples:
      • IBM AS/400
      • NEC Astra



    Mainframe

  • Huge computer
  • Can process large volume of data per second
  • Faster than minicomputer
  • More expensive than minicomputer
  • Can do intensive computational task





  • Supercomputer
  • Most powerful computer (very fast)
  • Most expensive
  • Used for running applications requiring complex and sophisticated mathematical calculations and applications.
  • Process several billions of instructions per seconds (bips)
  • Sensitive to temperature, humidity and dust.
  • Saturday, November 17, 2007

    Systems Analysis & Design - Determining System Requirements

    Determining System Requirements

    Learning Objectives
  • Describe options for designing and conducting interviews and develop a plan for conducting an interview to determine system requirements.
  • Design, distribute, and analyze questionnaires to determine system requirements.
  • Explain advantages and pitfalls of observing workers and analyzing business documents to determine requirements.
  • Explain how computing can provide support for requirements determination.
  • Learn about Joint Application Design (JAD)
  • Use prototyping during requirements determination.
  • Select the appropriate methods to elicit system requirements.
  • Apply requirements determination to Internet applications.



  • Performing Requirements Determination
  • Gather information on what system should do from many sources.
  • Users
    Reports
    Forms
    Procedures
  • Characteristics for gathering requirements
  • -Impertinence
    -Question everything
    -Impartiality
    -Find the best organizational solution
    -Relaxation of constraints
    -Attention to detail
    -Reframing - View the organization in new ways

    Deliverables and Outcomes
    • Types of deliverables:
      • Information collected from users
      • Existing documents and files
      • Computer-based information
      • Understanding of organizational components
        • Business objective
        • Information needs
        • Rules of data processing
        • Key events


    Traditional Methods for Determining Requirements
    • Interviewing and Listening
      • Gather facts, opinions and speculations
      • Observe body language and emotions
      • Guidelines
        • Plan
          • Checklist
          • Appointment
        • Be neutral
        • Listen
        • Seek a diverse view
    • Interviewing (Continued)
      • Interview Questions
        • Open-Ended
          • No pre-specified answers
        • Close-Ended
          • Respondent is asked to choose from a set of specified responses
    • Additional Guidelines
      • Do not phrase questions in ways that imply a wrong or right answer
      • Listen very carefully to what is being said
      • Type up notes within 48 hours
      • Do not set expectations about the new system
    • Administering Questionnaires
      • More cost-effective than interviews
      • Choosing respondents
        • Should be representative of all users
        • Types of samples
          • Convenient
          • Random sample
          • Purposeful sample
          • Stratified sample
    • Questionnaires
      • Design
        • Mostly closed-ended questions
        • Can be administered over the phone or in person
      • Vs. Interviews
        • Interviews cost more but yield more information
        • Questionnaires are more cost-effective
        • See table 7-4 for a complete comparison
    • Interviewing Groups
      • Advantages
        • More effective use of time
        • Enables people to hear opinions of others and to agree or disagree
      • Disadvantages
        • Difficulty in scheduling
      • Nominal Group Technique
        • Facilitated process to support idea generation by groups
        • Individuals work alone to generate ideas which are pooled under guidance of a trained facilitator
    • Directly Observing Users
      • Serves as a good method to supplement interviews
      • Often difficult to obtain unbiased data
        • People often work differently when being observed



    Analyzing Procedures and Other Documents
    • Types of information to be discovered:
      • Problems with existing system
      • Opportunity to meet new need
      • Organizational direction
      • Names of key individuals
      • Values of organization
      • Special information processing circumstances
      • Reasons for current system design
      • Rules for processing data
    • Four types of useful documents
      • Written work procedures
        • Describes how a job is performed
        • Includes data and information used and created in the process of performing the job or task
        • Business form
          • Explicitly indicate data flow in or out of a system.
        • Report
          • Enables the analyst to work backwards from the report to the data that generated it
        • Description of current information system


    Modern Methods for Determining Requirements
    Joint Application Design (JAD)
  • Brings together key users, managers and systems analysts
  • Purpose: collect system requirements simultaneously from key people
  • Conducted off-site
  • Prototyping
  • Repetitive process
  • Rudimentary version of system is built
    Replaces or augments SDLC
  • Goal: to develop concrete specifications for ultimate system


  • Joint Application Design (JAD)
    Participants
    -Session Leader
    -Users
    -Managers
    -Sponsor
    -Systems Analysts
    -Scribe
    -IS Staff
    End Result
    -Documentation detailing existing system
    -Features of proposed system
    CASE Tools During JAD
    -Upper CASE tools are used
    -Enables analysts to enter system models directly into CASE during the JAD session
    -Screen designs and prototyping can be done during JAD and shown to users
    Supporting JAD with GSS
    -Group support systems (GSS) can be used to enable more participation by group members in JAD
    -Members type their answers into the computer
    -All members of the group see what other members have been typing

    Prototyping
  • Quickly converts requirements to working version of system
  • Once the user sees requirements converted to system, will ask for modifications or will generate additional requests
  • Most useful when:
  • -User requests are not clear
    -Few users are involved in the system
    -Designs are complex and require concrete form
    -History of communication problems between analysts and users
    -Tools are readily available to build prototype
  • Drawbacks
  • -Tendency to avoid formal documentation
    -Difficult to adapt to more general user audience
    -Sharing data with other systems is often not considered
    -Systems Development Life Cycle (SDLC) checks are often bypassed

    Business Process Reengineering (BPR)
    • Search for and implementation of radical change in business processes to achieve breakthrough improvements in products and services
    • Goals
      • Reorganize complete flow of data in major sections of an organization
      • Eliminate unnecessary steps
      • Combine steps
      • Become more responsive to future change
    • Identification of processes to reengineer
      • Key business processes
        • Set of activities designed to produce specific output for a particular customer or market
        • Focused on customers and outcome
        • Same techniques are used as were used for requirements determination
    • Identify specific activities that can be improved through BPR
    • Disruptive technologies
      • Technologies that enable the breaking of long-held business rules that inhibit organizations from making radical business changes

    Systems Analysis & Design - Initiating & Planning Systems Development Projects

    Activities
    Project Initiation

  • Focuses on activities designed to assist in organizing team to conduct project planning.
  • Includes forming the project initiation team, establishing customer relationships, developing a plan to get the project started, setting project management procedures and creating overall environment.
    Project Planning
  • Define activities and the work needed to complete each activity within a single project.
  • Outcomes :
  • 1. BPP (Baseline Project Plan)
    2. SOW (Statement of Work)
  • ssumptions about resources availability and potential problems will be made.


  • Assessing Project Feasibility
    Economic
    -a process of identifying the financial benefits and costs associated with a development project.
    Technical
    -a process of assessing the development organization’s ability to construct a proposed system.
    -Include hardware, software, and operating system to be used in development.
    Operational
    -a process of assessing the degree to which a proposed system solves business problems or takes advantage of business opportunities.
    Schedule
    -a process of assessing the degree to which the potential time frame and completion dates for all major activities within a project meet the deadline and constraints for affecting change.
    Legal and contractual
    -a process of assessing potential legal and contractual ramifications due to the construction of a system.
    Political
    -a process of evaluating how stakeholders within the organization view the proposed system.

    Economic Feasibility
    Identify financial benefits and costs associated with a development project
    Benefits :
    Tangible - can be measured in dollars and with certainty
    Categories :
    1. Cost of reduction and avoidance
    2. Error reduction
    3. Increased feasibility
    4. Increased speed of activity
    5. Improvement of mgmt planning & control
    6. New markets & increase sales opportunity
    Intangible - cannot be measured in dollars/with certainty
  • May have direct organizational benefits or societal impact


  • Economic Feasibility - Costs
    Tangible - Examples: items like hardware, software, operational
    Intangible - Examples: loss of customer goodwill
    One-time - associated with project initiation & development and the startup of the system.
    - Example: new hardware, software purchase
    Recurring - cost resulting from the ongoing evolution and use of the system
    - Example: application software maintenance incremental data storage expense

    Technical Feasibility
    Assess the development organization’s ability to construct a proposed system.
    Assessment Factors:
    1. Project size.
    2. Project structure.
    3. The development group’s experience with the application and technology area.
    4. The user group’s experience with development projects and application area.

    Building the BPP
    Baseline Project Plan (BPP)
    contains all information collected during project initiation and planning.
    Four Sections in BPP:
    1. Introduction - project review & recommendation.
    2. System Description - alternatives & system description.
    3. Feasibility Assessment - economic, political & schedule, timeline and resource analysis.
    4. Management Issues - team configuration and management, communication plan, project standards and procedures, others.

    Systems Analysis & Design - Identifying & Selecting Systems Development Projects

    Identifying and Selecting Systems Development Projects

    Project Identification & Selection
    The process
    • Identifying potential development projects
      • top management, steering committee, user department, development group
    • Classifying and ranking projects
      • value chain analysis, strategic alignment, potential benefits, resource availability, project size, technical difficulty/risks
    • Selecting projects for development
      • decisions factors ->decisions outcomes
    Deliverables
  • A schedule of specific IS development projects.
  • An assurance that careful consideration was given to project selection.


  • IS Development Projects



    Corporate Strategic Planning
    an ongoing process that defines the mission, objectives and strategies of an organization.

    Gain an understanding of the current enterprise




    Top management must determine where it wants the enterprise to be in the future



    A strategic plan can be developed to guide this transition.




    IS Planning (ISP)
    an orderly means of assessing the information needs of an organization and defining the systems, databases and technologies that will best satisfy those needs.

    Assess current IS related assets - human resources,data, processes and technology.



    The blueprints of those resources are developed to reach the organization’s objectives.



    A series of scheduled projects is defined.




    Describing the Current Situation
    Top-down planning

  • A generic information systems planning methodology that attempts to gain a broad understanding of the information system needs of the entire organization.
  • Begins by conducting an analysis of the organization’s mission, objectives, strategy and determining the information requirements needed to achieve each objective.
  • Involved top-level management

  • Bottom-up planning
  • A generic information systems planning methodology that identifies and defines IS development projects based on problem solving or taking advantage of some business opportunities.
  • ns by the identification of business problems and opportunities.
  • an be faster and less costly to develop IS project.
  • t often fail to view the informational needs of the entire organization.
  • Friday, November 16, 2007

    Systems Analysis & Design - Managing IS Project

    Managing IS Project

    Managing the IS Project

  • Managing the Information Systems Project
  • Representing and Scheduling Project Plans

  • Managing the Information Systems Project
    Project?
    * a planned undertaking of related activities to reach an objective that have a beginning and an end

    Project management process
    1. Initiating the project
    2. Planning the project
    3. Executing the project
    4. Closing down the project

    Initiating the project
    1. Establishing the project initiation team
    2. Establishing a relationship with the customer
    3. Establishing the project initiation plan
    4. Establishing management procedures
    5. Establishing the project management and project workbook

    Project Planning
    1. Describing project scope, alternatives, and feasibility
    2. Dividing the project into manageable tasks
    3. Estimating resources and creating a resource plan
    4. Developing a preliminary schedule
    5. Developing a communication plan
    6. Determining project standards and procedures
    7. Identifying and assessing risk
    8. Creating a preliminary budget
    9. Developing a statement of work
    10. Setting a baseline project plan

    Representing and Scheduling Project Plans

    • Representing Project Plans
      • PERT and Gantt Chart
    • Using project management software
      • Microsoft Project
      • Primavera, KickStart etc

    PERT vs. Gantt

  • PERT chart

  • All us to show dependencies explicitly
    Allow us to calculate critical path
    Can tell us how one task filling behind affects other tasks

  • Gantt charts

  • Allow us to record progress of project
    Allow us to see what tasks are falling behind
    Allow us to represent overlapping tasks

    Project Management Tools
    An example is MS Project
  • Allow us to specify tasks, dependencies, etc
  • Allow us to specify progress on tasks, etc
  • Can generate either PERT or Gantt charts (whichever we want) from data entered



  • PERT CHART



    PERT CHART - the making
    Steps:
    1. Identify each activity to be completed in the project
    2. Determine:

      a. Optimistic time (o) - min
      b. Realistic time (r) - “best guess”
      c. Pessimistic time (p) - max
      d. Calculate ET:
        ET = o + 4r + p
            6
    3. Determine the sequence of the activities and precedence relationships among all activities
    Example :






      4. Determine the critical path(CP)
      * CP - delay in completion of an activity will result in delaying the entire project
      * slack time - the amount of time that an activity can be delayed without delaying the project
      * calculate TE (sum of the ET for each activity from LR)
      * calculate TL (time an activity can be completed without delaying the project - RL)

      ** CP = activities slack time equals to zero

      Systems Analysis & Design - Systems Development

      Systems Development

      Foundations for Systems Development
    1. The concept of systems development
    2. A modern approach to system analysis and design
    3. System Analyst in System Development
    4. Types of Information System and System development
    5. System development life cycle
    6. Skills required of a system analyst


    7. Systems Analysis and Design
      A complex, challenging, and stimulating organizational process that a team of business and systems professionals uses to develop and maintain computer-based information systems.

      The concept of systems development
    8. information system and design
    9. application software
    10. software engineering processes
    11. methodologies
    12. techniques
    13. tools


    14. A Modern Approach to System Analysis and Design
    15. Separating data and processes that handle data
    16. 3 components of IS :
      i. Data
      ii. Data flow
      iii. Processing logic
      * Process-oriented approach v.s.
      data-oriented approach
    17. Separating databases and applications database?
    18. Application independence
    19. Team:
      1. IS manager
      2. system analyst(SA)
      3. programmers
      4. end-users
      5. supporting end-user
      6. business managers
      7. other IS Managers/Technicians


    20. SA in System Development
      Systems Analyst
      "the key individuals in the systems development process"
      Skills required :
      1. Analytical skills
      2. Technical skills
      3. Management skills
      4. Interpersonal skills

      Skills Required for SA
      Technical Skills
      understands the potential and the limitations of IT
      Management Skills
    21. resource management
    22. project management
    23. risk management
    24. change management
    25. Interpersonal Skills
    26. communication skills
    27. interviewing, listening and questionnaires
    28. written and oral presentations
    29. working alone and with a team
    30. facilitating groups
    31. managing expectations


    32. Analytical Skills
      Sets of Analytical Skills:
    33. System Thinking
    34. Organizational Knowledge
    35. Problem Identifications
    36. Problem Analyzing and Solutions


    37. Organizational Knowledge
    38. How work officially gets done in a particular organization
    39. Understand the organization’s internal politics
    40. Understand the organization’s competitive and regulatory environment
    41. Understand the organization’s strategies and tactics


    42. Types of IS and System development
      1. Transaction processing systems
      2. Management Information system
      3. Decision support system (DSS)
      4. Expert systems

      System development life cycle


      Systems Thinking
      1. Identify something as a SYSTEM
      2. Translate a specific physical situation into abstract terms
      3. Think about the essential characteristics of a specific situation
      What is "SYSTEM"?
      DEFINITION : "An inter-related set of components with an identifiable boundary working together for some purpose"
      Characteristic of a SYSTEM
    43. Components/subsystems
    44. Inter-related components
    45. A boundary
    46. A purpose
    47. An environment
    48. Interfaces
    49. Input
    50. Output
    51. Constraints

    52. Important System Concepts
      To guide the design of Information System
      Decomposition - Breaking down a system into its components
      Modularity - Dividing a system up into chunks or modules of a relatively uniform size
      Coupling - The extent to which subsystems depend on each other
      Cohesion - The extent to which a system/subsystems performs a single function

      Problem Identification
      What is "PROBLEM"?
      To identify:
    53. compare current situation to the desired situation
    54. Use models which are relied on by the IS users but it depends on organizational areas
    55. see problems from a broader perspective


    56. Problem Analyzing & Solving
      Analysis :
    57. find out more about the problem
    58. Formulate alternative solutions to the problems
    59. Phases :
    60. 1. Intelligence
      2. Design
      3. Choice
      4. Implementation

      Wednesday, November 14, 2007

      Human Computer Interaction

      Introduction

    61. What is Human Computer Interaction?
      Is the study of the relationships which exist between human users and the computer systems they use in the performance of their various tasks.
    62. HCI seeks to provide an understanding of how users function, the tasks they need to perform and the way in which a computer systems needs to be structured to facilitate the easy carrying out of those tasks.

    63. The importance of HCI

      • HCI is important in the design process since the computer interface is the first point of contact the user has with the system and the user will judge the system on the basis of the interface.
      • Systems should consider some aspects of the cost:
        • The cost of software is high and the competitive edge is more difficult to achieve. The interface to a system might give it this edge.
        • The cost to train users is high, therefore, a system which is easy and natural to use will save money in the long run, since the training time will be kept to a minimum.
        • The cost of human error can be high. Systems that are transparent ought to reduce the likelihood of error or to aid error recovery.

      Taxonomy of HCI




      Use and context
      o social organization and work
      § Points of view (e.g. Industrial engineering, operations resesarch)
      § Models of human activity
      § Models of small groups and organisations
      § Models of work, workflow, offices.
      o application areas
      § Characterization of application areas (eg. Individual, group)
      § Document-oriented interfaces (eg. Text-editing, document formatting, spreadsheets, hypertext)
      o human-machine fit & adaptation
      § Arrange a fit between the designed object and its use.
      § Changes to fit can be made
      · At a design time/ at time of use
      · Either changing the system or the user
      Human characteristics (how people work and how they are expected to interact with machines)
      o human information processing
      § Phenomena and theory of memory, perception, motor skills, problem solving, motivation.
      o language, communication, and interaction
      § Syntax, semantics
      § Graphical interaction, query, command
      o ergonomics
      § physical factors
      § mental factors
      Computer system & interface architecture
      o input & output devices
      o dialogue techniques
      o dialogue genre
      o computer graphics
      o dialog architecture
      Development process
      o design approaches
      o implementation techniques & tool
      o evaluation techniques

      Components of HCI
      1. Human -user
      2. Computer - mediator
      3. Interface - used

      Relationship of HCI to other disciplines
      HCI

    64. Engineering
    65. Artificial Intelligence
    66. psychology
    67. Computer Science
    68. physiology
    69. Anthropology
    70. Ergonomics
    71. Linguistics
    72. Philosophy
    73. Art
    74. Sociology


    75. Disciplines contributing to HCI
      Computer Science
      o To provide knowledge about the capability of technology and ideas about how this potential can be harnessed.
      o Concerned about developing various kinds of techniques to support software design, development and maintenance.
      Cognitive Psychology
      o Concerned with understanding human behavior and the mental processes that underlie it.
      o To account for human behavior, cognitive psychology has adopted the notion of information processing such as what we see, what we touch, what we taste.
      Social and organizational psychology
      o Concerned with studying the nature and causes of human behaviour in a social context.
      o The role of social and organizational psychology is to inform designers about social and organizational structures and about how the introduction of computers will influence working practices.
      Ergonomics
      o Developed from the interests of a number of different disciplines.
      o Its purpose is to define and design tools and various artifacts for different work, leisure and domestic environments to suit the capabilities and capacities of users.
      Linguistics
      o Is the scientific study of language
      o Understanding of the syntax (structure) and semantic (meaning) is important
      Artificial Intelligence
      o Concerned with the design of intelligent computer programs which simulate different aspects of intelligent human behaviour.
      o The relationship of AI and HCI is mainly concerned with users’ needs when interacting with an intelligent interface.
      Philosophy, sociology and anthropology
      o Traditionally, they have not been directly involved with the actual design of computer systems, but rather with the consequences of developments in information technology and technology transfer.
      Engineering and design
      o Engineering is the applies science which relies heavily on model building and empirical testing. its takes the findings of science and utilizes them in the production of artifacts.
      o Design contributes creative skills and knowledge to this process.

      Factors in HCI



      Human Factors (Ergonomics)

      • Is the study of the physical characteristics of the interaction:
        • How the controls are designed
        • The physical environment in which the interaction takes place
        • The layout and physical qualities of the screen.


      Issues Addressed by Ergonomics
      • Arrangement of controls and displays
        • Sets of controls and parts of the display should be grouped logically to allow rapid access by the user.
        • Should be organized in terms of:
          • Functionality – controls and displays are organized so that those that are functionally related are placed together
          • Sequential - controls and displays are organized in a particular task sequence.
          • Frequency - controls and displays are organized based on the frequency of used
      • The physical environment of the interaction
        • Where will the system be used
        • By whom will it be used
        • Will users be sitting, standing or moving about
        • Considerations
          • Size The smallest user should be able to reach all the controls (this may include a user in a wheelchair), and the largest user should not be cramped in the environment. In particular, all users should be comfortably able to see critical displays.
          • Seat For long period of use, the user should be seated for comfort and stability, and seating should provide back support.
          • Stand If required to stand, the user should have room to move around in order to reach all the controls.
      • Health Issues
        • These are the factors in the physical environment that directly affect the quality of the interaction and the user's performance :
          • Physical Position
          • Temperature
          • Lighting
          • Noise
          • Time
      • The use of colour
        • Importance of Arrangement of Control and Displays
          • Give strong emotional reaction
          • Add accents to an uninteresting display
          • Facilitate subtle discrimination in complex displays
          • Emphasize the logical organization of information
          • Draw attention to alert the users

        The C Language

        The Language
        Where did it come from?
        -Seed language was the Basic Combined Programming Language(BCPL) in 1967
        -BCPL refined into a language called B
        -Dennis Ritchie enhanced B to form C in 1972
        -The American National Standards Institute(ANSI) completed C standards in 1988

        Why C?
        -C is a powerful and flexible language.
        -C is a popular language preferred by professional programmers.
        -C is a portable language.
        -C is a language of few words, containing only a handful of terms keywords.
        -C is modular.
        -Structured language.









        Forming a C Program
        Whitespace
        -spaces, tabs, line endings, and blank lines.
        -irrelevant to the compiler.
        -should be used in specific places to make your program more readable.

        Outline Form
        -Your program should resemble an outline with main topics to the left and subordinate topics to the right.
        -Statements end with semicolon ";"
        -Where the line ends is usually not important.
        -However, line breaks are not allowed inside of quotations.

        Comments
        -Comments in C are shown by /* and */
        -Everything between /* and */ is ignored by the compiler.
        -Comments are very important to the understandability of a program.
        -Make sure you end all of your comments.

        Directives
        -Directives tell the preprocessor to do things
        -Directives always begin with #
        -Directives end at the end of the source line
        -The #include in the example program tells the preprocessor to insert the code found in the stdio.h file at that location.

        Statements
        -A statement is a HLL instruction that performs a specific operation.
        e.g. quiz = 20;
        -All single statements end with a semicolon and may extend over multiple lines.
        e.g. printf("A perfect quiz is %d points.\n", quiz);
        Assignment statement
        -A statement is a complete direction instructing the computer to carry out some task.
        e.g. x = 2 + 3;
        Compound statement
        -A block, group two or more C statement enclosed in braces
        e.g. { printf("Hello");
        printf("Class"); }

        Functions
        -A function is a set of instructions that performs an operation
        -A function will always have a name that can be used to reference (or call) the function.
        -The function name will be followed by the argument list in parentheses (sometimes there will be no arguments and so the parentheses will be empty).


        Values in C
        Numeric values
        -Real numbers
        -Integral number (or whole numbers)
        Character values
        -ASCII code is an integer value for characters
        -The character 'A' is the same as 65 in ASCII
        -You can add characters
        'A' + ' ' = 'a' 65 + 32 = 97






        Special ASCII Characters
        -Special characters have a backslash \ followed by a printable character
        \0 = Null \t = Horizontal tab
        \a = Audible alarm \v = Vertical tab
        \b = Backspace \' = Apostrophe
        \f = Form feed \" = Quote
        \n = New line \? = Question mark
        \r = Carriage Return \\ = Backslash






        Integral Data Types
        - Basic types
        § Character type char
        § Integer type int
        § Floating type float
        § Valueless type void
        - Both can be signed (default) or unsigned
        - Type int can be short, long, or neither
        - Type float can be double, long double
        - Signed allows the value to be negative
        - Unsigned allows only positive (and zero)
















        The char Data Type
        - Eight bits long
        - Used to store characters, but really numbers
        - Range for signed char values is -128 to 127
        - Range for unsigned char values is 0 to 255
        - Some valid char declarations
        char letter;
        unsigned char index;
        char TopGrade = ‘A’, BottonGrade = ‘F’;
        char TopGrade = 65, BottonGrade = 70;

        The int Data Type
        - Variable length
        - Type long int at least as big as short int
        - The word int can be implicit
        - Some valid int declarations
        int currentPage, lastPage;
        short age;
        unsigned volts = 110;
        unsigned volts = ‘n’;
        unsigned long nationalDebt;
        signed short variance;

        Floating Point Data Types
        -Stored in scientific notation
        o Mantissa of significant digits
        o Exponent power of 10
        -Expressed in standard or scientific notation
        o Can use 7146.0 or 7.146e3
        -Three flavors (float, double, long double)
        o Type double greater than or equal to float
        o Type long double greater than or equal to double

        Floating Point Forms
        -A value with a decimal stored as double
        -Explicitly assign type
        o Use F or f for a float (3.806e-3F or 0.003806F)
        o Use L or l for a long double
        -Some valid floating point declarations
        float wageRate = 12.75;
        double area, volume;
        long double humongous;







        String Data
        - A string is a set of characters
        - String values indicated by quotes
        o For example, “This is a string”
        - The quotes are not part of the string
        printf(“This is a string”);
        results in
        This is a string

        More String Data
        - Adjacent strings are concatenated
        o So, “This is just” “one string.” would be stored as This is just one string.
        - Remember, no line endings inside a string
        - Quote marks within the string are special characters and are indicated by \”
        printf(“Her name\nis \”Henrietta.\””);
        Her name
        is “Henrietta.”

        Variables
        - Represent a location or locations in memory
        - Values are placed there to be used in a program
        - Values can change, thus are “variable”
        - Variable names are used to reference

        Variable Names
        - Length depends on compiler (at least 31)
        - Only alpha-numeric (A to Z, a to z, and 0 to 9) characters and the underscore ( _ )
        - Must begin with alpha or underscore
        - No blank space between variable names
        - C is case-sensitive
        o So Total is different from total and toTal
        - No reserved words (also called keywords)

        Variable Declarations
        - All variables must be declared before used
        datatype variable [= initialization]
        int frequency;
        int StartValue = 14;
        - A declaration does a number of things
        o Tells the compiler how to store the value
        o Defines it, memory is allocated for it
        o May initialize it, giving it an initial value

        Simple Output
        - Most common output function is printf()
        - Uses codes to represent data placement
        o Character values represented by
        %c
        o Integer values represented by
        %d
        o Float values represented by
        %f
        o ASCII values for characters can be printed by using the integer code %d

        Conversion Characters
        %s string of character
        %c character
        %d decimal integer
        %f floating-point numbers
        %e exponential notation
        %o octal integer
        %x hexadecimal integer
        %% percent sign (%)

        Example of Output
        Program :
        #include
        void main(void)
        {
        printf(“Here is the character %c,\n”, ‘X’);
        printf(“and the numbers %d and %f.\n”, 46, 12.345);
        printf(“Now we will print %d as a number.\n”, ‘X’);
        printf(“Things will really be messed up if we confuse\n”
        “data types, such as %f and %d.\n”, 46, 12.345);
        }
        Output:
        Here is the character X,
        and the numbers 46 and 12.345.
        Now we will print 88 as a number.
        Things will really be messed up if we confuse
        data types, such as -2.19317e-73 and 16424.

        Expression
        - Anything that evaluates to a numeric value
        - consist of a single item, simple variable, literal constant or symbolic constant
        e.g.
        2 + 3;
        or
        rate * 5;

        Operators
        - An operator is a symbol that performs a specific mathematical or logical operation
        - Types of operators
        · arithmetic
        · assignment
        · equality
        · relational
        · logical
        · Increment and Decrement operators

        Arithmetic Expressions
        - Anything reducible to a single value
        - Consists of values and/or variables connected by arithmetic operators
        - Precedence determines what operator gets done first
        - Associativity dictates the order if two operators have the same precedence

        RULES OF OPERATOR PRECEDENCE
        1. Parentheses ( )
        2. Multiplication *
        Division /
        Modulus %
        3. Addition +
        Subtraction -

        Integer Arithmetic
        - Result is integer
        - Be careful result is not too big
        o For example, 32000 * 10 can result in -7680
        - Division truncates any fractions
        o The result of 3 / 2 is 1, not 1.5
        - Remainder (or modulo or modulus)
        o Only good with positive integers
        o The result of 14 % 10 is 4, 3 % 10 is 3

        Mixed Arithmetic
        - Result is the highest data type used
        - Highest data type takes most memory
        o Floats are higher than Integers

















































































































        Example
        Assignment OperatorSample Expression
        +=c+=7
        -=d-=4
        *=e*=5
        /=f/=3
        %=g%=9


        Equality
        To determine whether two items are equal to one another.










































































        C equalitystandard algebraic
        == (x == 100)



        =
        != (5 != x)





        Relational
        C provides a set of relational that allows you to compare numbers.
        Operator Example
        > x>100
        >= x>=20






        Logical
        C provides a set of logical that are used to combine expressions into logical expression
        Operator
        && logical AND

        II logical OR

        Increment & Decrement
        ++ ++a = increment a by 1 then use the new value of a in the expression in which a resides
        ++ a++ = use the current value of a in the expression in which a resides, then increment a by 1
        -- --a = decrement a by 1 then use the new value of a in the expression in which a resides
        -- a-- = use the current value of a in the expression in which a resides, then decrement a by 1

        Computers and Programming

        Definition of a Computer
        A machine that given instructions and can manipulate data by itself.

        Basic Computer Needs
        -Need to perform calculations faster and more accurately.
        -Need to control processes consistently.
        -Need to handle larger and larger amounts of data

        Computer System
        -A computer system contains two parts:
        -Hardware: actual pieces of equipment
        -keyboards, screens, components inside the boxes, printers, modems, etc.
        -Software: instructions that direct
        -operating systems, compilers, applications

        Hardware
        -Access to data
        -Read: fetching information from somewhere
        -Write: putting information somewhere
        -Common hardware components
        -Central Processing Unit(CPU)
        -Main Memory
        -Secondary Storage
        -Input & Output(I/O)


        CPU
        -CPU is the heart of any computer
        -Three functions
        1. control: CPU takes on instruction at a time and follows it to direct the rest of the system.
        2. arithmetic operations: addition, subtraction, multiplication, division.
        3. logical operation: comparisons

        Main Memory
        -Main memory is a temporary, working storage area.
        -Stores two types of things:
        1. current set of instructions the CPU is following.
        2. data these instructions manipulate.
        -Made up locations with unique addresses.
        -Addresses allow random access of data.
        -Very fast, but expensive and volatile.

        Secondary Storage
        -Permanent storage device
        -Disk, hard and floppy, are common examples
        -Relatively cheap, but slow(can be hundreds of times slower than Main Memory)
        -Accessed in blocks(many characters at a time)

        I/O Devices
        -Provide a way for humans to communicate with computers
        -Common input devices:
        1. Keyboard
        2. Mouse
        3. Scanner
        -Common output devices:
        1. Monitor
        2. Printer
        3. Speaker

        Tuesday, November 13, 2007

        Visual Basic

        What is Programming?
        The process of writing or creating list of instruction to be carried out by the computer.Programmer writes programs on a computer.

        Programming Language

        • There are hundreds of programming languages:
          • Procedural language -> BASIC, C, COBOL, FORTAN
          • Object-oriented event-driven programming language(OOED)
        • So, Visual Basics falls into which category?

        Is an OOED language.
        Why?
        1. Was developed to help create programs that will work with the Windows Operating System.
        2. Object-oriented language - form, button, image
        3. Event driven: does not follow a predefined sequence of instruction; it responds to events(click, load, mouse down) to execute different sets of instructions.

        Introduction to Visual Basic



        Writing Windows Applications with Visual Basic
      • VB runs in the Microsoft Windows environment
      • VB provides the tools to create windows with familiar elements
      • Microsoft Windows uses a graphical user interface (GUI) – forms, controls -> Event-driven Programming


      • Object Model
        •In VB, we will work with objects, properties and methods:
        Objects: Thing/Noun - Forms, controls
        Properties: Tell something about an object – name, color, size, location, behavior/Adjective
        [Object.Property] -> Form1.Caption
        Methods: Actions associated with objects/Verb – Move, Print, Resize, Clear
        [Object.Method]-> Form1.Print
        •Event – clicking on a command button, moving the mouse, resizing the window

        Visual Basic Projects
        •VB project consists of at least two and more files:
        –.vbp (project file) – a small text file that holds the names of the other files in the project and some information about the VB environment.
        –.frm – holds a description of all objects and their properties for the form and the Basic code written to respond to the events.
        –.bas (standard code modules)– holds Basic statements that can be accessed from any form
        –.ocx – include controls that are not part of the standard control set.vbw – holds information about each of the project’s forms.

        Visual Basic Event Procedure
        •Code is written in procedures
        •Two types of procedures: Sub & Function
        •Sub procedure begins with Private Sub and end with End Sub
        •VB automatically names the event procedures; consists of the object name, an underscore, and the name of the event.
        Example: the Click event for a command button called cmdCalculate -> cmdCalculate_Click

        An Event Procedure Walkthrough
        •Create the interface.
        •Set Properties.
        •Double click on the object to open the Code window.
        •Click on the Procedure box to find the event
        •Write the code for that event.

        Example of An Event
        Private Sub objectName_event ( )
        statements
        End Sub
        Private Sub txtOne_GotFocus( )
        txtOne.Font.Size = 12
        txtOne.Font.Bold = False
        End Sub


        More Example
        Private Sub cmdButton_Click( )
        txtBox.ForeColor = vbRed
        txtBox.Font.Size = 24
        txtBox.Text = “Hello”
        End Sub


        Visual Basic Code Statement
        •Remark statement/Comments
        –Used for project documentation only.
        –Not considered executable and have no effect when the project runs
        –Purpose: To make the project more readable and understandable
        –Begin with an apostrophe
        –Example: ‘This project was written by Alicia


        Visual Basic Code Statement
      • End statement

      • –Stops execution of a project
        –Example: End


        InputBox Function
      • Used to request input from the user

      • In the input box, we can display a message called prompt and allow the user to type input into the text box

      • General Form:
      • VariableName = InputBox(“Prompt”[, “Title”] [Default] [, XPos] [, YPos])
      • Example:
      • strName = InputBox("What is your name ?", "Input Request")
      • The Prompt must be enclosed in quotation marks

      • The Title displays in the title bar. If the Title is missing, the project name appears in the title bar

      • Any value we place in Default appears in the text box when it is displayed; otherwise the text box is empty

      • XPos and YPos define the measurement in twips for the left and top edge of the box





      • Message Box
      • A message box displays a message to the user

      • We can display a message, an optional icon, a title bar caption and a command button(s) in a message box

      • General Form:

      • MsgBox “Message string” [, Buttons/icon] [, “Caption of title bar”]
      • Example:

      • MsgBox “Please Enter your name.”, vbOKOnly, “Name Missing”
      • The Message string is the message appeared in the message box

      • The Buttons is optional – it determines the command buttons that will display and any icons that will appear

      • If we omit the Caption of title bar, the project’s name will appear in the message box title bar