Loading...

PROGRAMMING CONCEPTS  

>

LEARNING OUTCOME 1

SYSTEM AND USER REQUIREMENTS

Definitions

Explanation

User requirements focus on the "what" - what the user wants the system to accomplish. They describe the features and functionalities that will be valuable to the user. System requirements, on the other hand, focus on the "how" - how the system will be built to deliver the functionalities outlined in the user requirements. They delve into the technical aspects like programming languages, hardware specifications, and security measures.

Example:

Differences

Here's a table summarizing the key differences between user requirements and system requirements:

Feature User Requirements System Requirements
Focus User needs and goals System capabilities and constraints
Language Plain language Technical language
Audience End users Developers and engineers
Level of Detail High level overview Specific and measurable
Example "The system should allow users to upload photos." "The system shall support image uploads in JPEG and PNG formats, with a maximum file size of 10 MB."

FACT-FINDING METHODS

Fact-finding methods are essentially tools used to gather information and data in a structured way. This information is then used to understand a situation, identify problems, and develop solutions. They are widely used in various fields, including business analysis, system development, research, and more. Here's a breakdown of some common fact-finding methods:

  1. Examining Documentation:
    • Definition: Reviewing existing documents, reports, and records to gain insights into current processes, policies, and data.
    • Advantages:
      • Easy access to information
      • Provides a historical perspective
      • Can be done independently
      • Saves time and resources
      • Creates an audit trail
    • Disadvantages:
      • Information may be outdated or inaccurate
      • Limited to what's documented
      • May not capture the complete picture
      • Relies on the quality of documentation
      • Can be time-consuming to locate relevant documents
  2. Interviewing:
    • Definition: Conducting one-on-one or group discussions to gather information directly from stakeholders.
    • Advantages:
      • In-depth exploration of topics
      • Clarification and probing for details
      • Uncover unspoken issues or concerns
      • Build rapport and trust
      • Gain insights into perspectives and experiences
    • Disadvantages:
      • Time-consuming to schedule and conduct
      • Can be subjective based on the interviewer's bias
      • May not get honest responses due to social desirability
      • Costly if extensive interviews are required
      • Requires good interviewing skills
  3. Observation:
    • Definition: Watching people perform tasks in their work environment to understand processes and identify potential issues.
    • Advantages:
      • Provides firsthand understanding of workflows
      • Identifies bottlenecks and inefficiencies
      • Captures nonverbal cues and body language
      • Complements data collected through other methods
      • Minimizes disruption to the workflow
    • Disadvantages:
      • Time-consuming to observe for extended periods
      • Reactivity: People may behave differently when observed
      • Observer bias can influence interpretation
      • Limited scope to specific tasks or processes
      • Ethical considerations regarding privacy
  4. Questionnaires:
    • Definition: Standardized surveys with predetermined questions used to gather information from a large group of people.
    • Advantages:
      • Cost-effective way to collect data from a large sample
      • Efficient for gathering quantitative data
      • Allows for anonymity and honest responses
      • Easy to analyze and compare data
      • Minimizes interviewer bias
    • Disadvantages:
      • Limited follow-up or clarification opportunities
      • Low response rates can affect data validity
      • Question design can influence answers
      • May not capture complex issues or nuances
      • Not suitable for in-depth exploration
  5. Research:
    • Definition: Reviewing existing studies, reports, and data related to the topic to gain background knowledge and industry trends.
    • Advantages:
      • Provides a broader context and understanding
      • Saves time and effort by leveraging existing knowledge
      • Identifies best practices and potential solutions
      • Strengthens the credibility of your findings
      • Helps avoid reinventing the wheel
    • Disadvantages:
      • Information might not be directly applicable to your specific situation
      • Quality and accuracy of research sources vary
      • May not address the latest developments
      • Time-consuming to find and evaluate relevant research
      • Requires critical thinking skills to assess research validity

IDENTIFYING INPUTS, PROCESSES, AND OUTPUTS

  1. Inputs:
    • Definition: Inputs are the data or instructions that a program receives from the user or another source. They are the starting point for the program's execution.
    • Types/Examples:
      • User input: Data entered by the user through keyboard, mouse, touch screen, etc. (e.g., name, age, product selection)
      • Sensor data: Information gathered from physical sensors (e.g., temperature, light level)
      • File data: Information read from a file on the computer (e.g., configuration settings, image data)
      • Network data: Information received from another computer or device over a network (e.g., API response, web page content)
  2. Processes:
    • Definition: Processes are the steps or instructions that the program follows to transform the input data into the desired output. They represent the core logic and functionality of the program.
    • Types/Examples:
      • Calculations: Performing mathematical operations like addition, subtraction, or complex equations. (e.g., calculating area, converting currencies)
      • Data manipulation: Sorting, filtering, searching, or modifying data based on specific criteria. (e.g., sorting a list of names alphabetically, filtering products based on price)
      • Control flow: Making decisions based on conditions and branching the program execution accordingly. (e.g., checking if a user is logged in, displaying different content based on choices)
      • Function calls: Executing pre-defined blocks of code (functions) to perform specific tasks. (e.g., calculating square root, formatting a string)
  3. Outputs:
    • Definition: Outputs are the results generated by the program after processing the inputs. They are the information presented to the user or another system.
    • Types/Examples:
      • Displayed information: Data shown on the screen, console, or other visual interfaces. (e.g., calculated results, formatted reports, generated images)
      • Saved data: Information written to a file or database for future use. (e.g., user preferences, transaction history)
      • Returned values: Data sent back to another program or function that called it. (e.g., result of a calculation, confirmation of successful operation)
      • Device control: Sending signals to control external devices. (e.g., turning on a light, playing a sound)

Alternative Solutions to Business Problems: Off-the-Shelf

Here's a breakdown of three popular solutions for business software needs, along with their advantages and disadvantages to help you decide which might be the most suitable alternative:

  1. Purchasing Off-the-Shelf Software:
    • Definition: This involves buying pre-built software that caters to general business needs or specific industry functions. It's a readily available solution requiring minimal customization.
    • Advantages:
      • Cost-effective: Often less expensive than in-house development or outsourcing.
      • Faster implementation: Quicker to deploy as customization is minimal.
      • Vendor support: Benefit from ongoing support and updates from the software vendor.
      • Proven functionality: Leverage established features and functionalities tested by a wider user base.
      • Reduced risk: Lower upfront investment compared to in-house development.
    • Disadvantages:
      • Limited customization: May not perfectly fit your specific business needs.
      • Integration challenges: Integration with existing systems might require additional effort.
      • Vendor lock-in: Dependence on the vendor for future updates and support.
      • Scalability limitations: May not adapt well to significant growth or changing business requirements.
      • Hidden costs: Ongoing subscription fees or maintenance costs can add up over time.
  2. Outsourcing Software Development:
    • Definition: Hiring an external company to develop custom software tailored to your specific needs and functionalities.
    • Advantages:
      • Scalability and flexibility: Adaptable to accommodate changing business requirements.
      • Access to expertise: Leverage the expertise and resources of experienced developers.
      • Cost-effectiveness (potentially): May be cheaper than in-house development depending on project scope and location.
      • Focus on core business: Frees your internal resources to focus on core competencies.
      • Faster development (potentially): May offer faster completion for smaller projects compared to building a team in-house.
    • Disadvantages:
      • Communication challenges: Clear communication and project management are crucial for success.
      • Loss of control: Less direct control over the development process and project timeline.
      • Intellectual property concerns: Ensure proper ownership and licensing of the developed software.
      • Hidden costs: Project scope creep and additional expenses can occur.
      • Integration challenges: Integration with existing systems might require additional effort.
  3. In-House Development:
    • Definition: Building the software within your organization using your own employees or a dedicated in-house development team.
    • Advantages:
      • Full control and customization: Complete control over the software's features and functionalities.
      • Scalability and flexibility: Adaptable to your specific needs and future growth.
      • Integration ease: Easier integration with existing systems within your organization.
      • Protection of intellectual property: You retain full ownership of the developed software.
      • Alignment with business goals: Ensures the software directly aligns with your business objectives.
    • Disadvantages:
      • Higher upfront cost: Requires significant investment in hiring developers, tools, and infrastructure.
      • Longer development time: Building from scratch takes longer than using existing solutions.
      • Resource dependence: Relies heavily on the skills and expertise of your development team.
      • Management complexity: Requires strong project management and leadership.
      • Risk of talent shortage: Finding and retaining skilled developers can be challenging.

WALKTHROUGHS

What are Walkthroughs?

A walkthrough is a structured meeting where a team collaboratively examines a process, document, software application, or task. It involves systematically stepping through each element, identifying potential issues, and discussing improvement opportunities.

Why are Walkthroughs Done?

Walkthroughs serve several purposes:

User Involvement in Solving Business Problems

Including users in walkthroughs, particularly those involving software applications, workflows, or tasks they interact with, is crucial. Here's why:

FLOWCHARTS, ALGORITHMS, AND PSEUDOCODE

These three concepts are fundamental tools for planning and designing programs before diving into actual coding. Here's a breakdown of each:

1. Flowcharts:

Example: Here's a flowchart for a simple program that checks if a number is even or odd:

flowchart example

2. Algorithms:

algorithm example

Pseudocode

How to Create:

  1. Use Keywords: Use keywords like "if," "else," "while," "for," etc., to represent control flow and logic.
  2. Mimic Programming Language: Structure the pseudocode in a way that resembles the programming language you plan to use, making the transition to actual coding smoother.
  3. Focus on Readability: Maintain clarity and readability, ensuring anyone can understand the overall logic.

Example:

Here's pseudocode for the even/odd checker program:

algorithm example

ALGORITHMS

An algorithm is the foundation of any computer program. It's essentially a set of well-defined instructions that, when followed step-by-step, solves a specific problem or accomplishes a particular task. Here's a breakdown of its definition and key characteristics:

Definition

An algorithm is a finite sequence of precise instructions that provide a clear and unambiguous solution to a specific problem. It acts as a roadmap, guiding the computer through the necessary steps to achieve the desired outcome.

Characteristics of a Well-Defined Algorithm

Examples of Algorithms

CONVERTING PROGRAM DESIGNS

Transforming program designs like algorithms and pseudocode into actual C++ code involves translating the high-level steps into the specific syntax and functionalities of the C++ programming language. Here's a breakdown of the process with examples:

Algorithm to C++ Code:

Example: Algorithm: Calculate the factorial of a number (n!).

algorithm example
  1. C++ Code:
        
          #include 
          using namespace std;
          int main() {
           int n, factorial = 1;
           cout << "Enter a non-negative integer: ";
           cin >> n;
           if (n < 0) {
           cout << "Error: Factorial is not defined for negative numbers." <<
           endl;
           return 1; // Indicate error
           }
           for (int i = 1; i <= n; ++i) {
           factorial *= i;
           }
           cout << "The factorial of " << n << " is: " << factorial << endl;
           return 0;
          }
        
      

Explanation

Pseudocode to C++ Code

  1. Example: Describe the step-by-step process of calculating the factorial of a given non-negative integer.
  2. Pseudocode:
algorithm example
  1. C++ Code
          
            #include 
                using namespace std;
                int main() {
                 int number1, number2;
                 cout << "Enter the first number: ";
                 cin >> number1;
                 cout << "Enter the second number: ";
                 cin >> number2;
                 if (number1 > number2) {
                 cout << number1 << " is greater than " << number2 << endl;
                 } else {
                 cout << number2 << " is greater than " << number1 << endl;
                 }
                 return 0;
                }
          
        

Explanation

End of Outcome Quiz

1 of 20

    Quiz Score

    Percentage: 0%

    Answered Questions: 0

    Correct Answers: 0

    Faults: