This week in class we went over the unit of computational think. Or in other words how to solve problem in a similar manner as a computer think. This way of thinking is how to putting a problem into a way that we can go on and put into code later on. In computational thinking there are 4 main pillars.

  • Decomposition – breaking a big problem into smaller parts
  • Abstraction – removing information irrelevant to solving the problem
  • Pattern Recognition – looking for patterns to help simply
  • Algorithms – a set of step by step instruction written in everyday langue

Down bellow are the assignment problems that where put into algorithms and flow charts using the four pillars of Computational thinking.

Problem 2: Deciding if Courtenay is Safe to Land

  1. find out what the current wind conditions are
  2. determine if the current wind conditions are over 12 knots
  3. if yes land in Smits field
  4. if no land in Courtenay

Problem 3: Find alternate landing time or location

  1. put in the current time
  2. put in the time left
  3. subtract the current time from the time left and call it landing time
  4. put in available time
  5. compare the a landing time to the to the available time
  6. determine if the available time is greater than or equal the landing time
  7. is the available is greater than the landing time output land in Courtney
  8. finish running program
  9. if it is determined that the available time is lesser than the landing time determine if the list is empty
  10. if the list is not empty go back to compare landing time to available time and continue the program
  11. if the list is empty land in Smits Field
  12. finish running program

Problem 4: Book a Dinner Reservation

  1. put in the results of problem 3
  2. put in the landing time
  3. determine if the plane is landing in Courtenay
  4. if the the answer to determining the plane is landing in Courtenay is yes add 20 mins to the landing time
  5. input the available reservation time
  6. compare the taxi time to the available reservation time
  7. determine if the available reservation time is grater or equal to the taxi time
  8. if the out come is yes output reservations
  9. finish program
  10. if the out come is no determine if the list is empty
  11. if the list is empty out put no reservations available
  12. finish program
  13. if the list is not empty go back to comparing taxi time to reservation time and continue program
  14. if the determined answer for landing in Courtenay is no as 45min to landing time and call it loaner care time
  15. call the Air Marshall to request a loaner car
  16. put in available reservation times
  17. compare the available reservation times to the loaner care times
  18. if greater or equal to out put book reservation
  19. finish program
  20. if lesser than
  21. determine if the list is empty
  22. if the list is empty then output no available reservation
  23. finish program
  24. is the list is not empty go back to compare loaner car time to available reservation time