Docsity

Problem Solving and Programming: Skills for Software Engineers, Study notes of Computer Science

Partial preview of the text

Download Problem Solving and Programming: Skills for Software Engineers and more Study notes Computer Science in PDF only on Docsity!

Problem Solving and Programming

Dr. A. Nayeemulla Khan

Skills Required for a Software Engineer

Technical Skills

  • (^) Software Design
  • (^) Coding
  • (^) Testing

Problem Solving Skills

  • (^) logical and analytical thinking

Soft Skills

  • (^) Communication
  • (^) Team Work

Problem

• Constraint : Librarian issues books only to VIT

employees

Questions about the scenario:

1 How many books are there in the library?

2 How many books can be issued to an

employee?

3. Does the librarian issue a book to himself? etc

Case study - Discussion

Have you ever observed this scenario? Yes!!! What are the problems in the scenario?

Types of Problems

  • (^) The solutions of other problems, such as how to buy the best stock or whether to expand the company, are not so straightforward.
  • (^) These solutions require reasoning built on knowledge and experience, and a process of trial and error.
  • (^) Solutions that cannot be reached through a direct set of steps are called heuristic solution

Problem Solving with Computers

  • (^) Computers are built to solve problems with algorithmic solutions, which are often difficult or very time consuming when input is large
  • (^) Solving a complicated calculus problem or alphabetizing 10, names is an easy task for the computer
  • (^) So the basis for solving any problem through computers is by developing an algorithm

Computational Problems

• Computation is the process of evolution from

one state to another in accordance with some

rules.

Types of Computational Problems

Logic – Basis for solving any problem

  • (^) Definition : A method of human thought that
involves thinking in a linear, step by step manner
about how a problem can be solved
  • (^) Logic is a language for reasoning.
  • (^) It is a collection of rules we use when doing reasoning.
  • (^) Eg: John's mum has four children.
  • (^) The first child is called April.
  • (^) The second May.
  • (^) The third June.
  • (^) What is the name of the fourth child?

PRE-PROGRAMMING PHASE

• Analyzing The Problem

  • (^) Understand and analyze the problem to determine

whether it can be solved by a computer.

  • (^) Analyze the requirements of the problem.
  • (^) Identify the following:
    • (^) Data requirement.
    • (^) Processing requirement or procedures that will be needed to solve the problem.
    • (^) The output.

PRE-PROGRAMMING PHASE

  • (^) All these requirements can be presented in a

Problem Analysis Chart (PAC)

Data Processing Output Solution Alternatives given in the problem or provided by the user List of processing required or procedures. Output requirement. List of ideas for the solution of the problem.

Miles to Km

Write a Problem Analysis Chart (PAC) to convert

the distance in miles to kilometers where 1.

kilometers per mile.

Data Processing Output Solution Alternatives Distance in miles Kilometers = 1.609 x miles Distance in kilometers

  1. Define the miles as constants. āˆ— 2. Define the miles as input values.

Importance of Logic in problem solving Data Processing Output Solution^ Alternatives Number, N Check if there is a factor for N Print Prime or Not Prime

  1. Divide N by numbers from 2 to N and if for all the division operations, the reminder is non zero, the number is prime otherwise it is not prime
  2. Same as 1 but divide the N from 2 to N/
  3. Same as Logic 1 but divide N from 2 to square root of N Determine whether a given number is prime or not?