Pre-conditions: Difference between revisions
Mr. MacKenty (talk | contribs) (Created page with "right|frame|Pre-conditions<ref>http://www.flaticon.com/</ref> Pre-planning is '''set up or preparation''' required before a solution is implemented. Pack...") |
Mr. MacKenty (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
Pre-conditions are required because many processes require conditions to be executed. Could you eat your lunch if you didn't pack your lunch? Should you be able to check any bank balance without logging in? | Pre-conditions are required because many processes require conditions to be executed. Could you eat your lunch if you didn't pack your lunch? Should you be able to check any bank balance without logging in? | ||
You should be asking yourself "what needs to happen in order for ....... to happen ". This is a practice of thinking you should adopt. | |||
== Example == | == Example == | ||
Scheduling a meeting is a classic example of the importance and need of multiple pre-conditions. In order to have a meeting with someone, we have | Scheduling a meeting is a classic example of the importance and need of multiple pre-conditions. In order to have a meeting with someone, we might have the following pre-conditions: | ||
# an available place to meet | |||
# a time to meet | |||
# availability of the people to meet | |||
# a topic or agenda | |||
== Standards == | == Standards == |
Latest revision as of 06:42, 19 November 2020
Pre-planning is set up or preparation required before a solution is implemented. Packing your lunch is a pre-condition to eating lunch. Bringing your lunch to school is a pre-condition to eating your lunch at school. Logging in is a pre-condition to checking your online bank balance.
Pre-conditions are required because many processes require conditions to be executed. Could you eat your lunch if you didn't pack your lunch? Should you be able to check any bank balance without logging in?
You should be asking yourself "what needs to happen in order for ....... to happen ". This is a practice of thinking you should adopt.
Example[edit]
Scheduling a meeting is a classic example of the importance and need of multiple pre-conditions. In order to have a meeting with someone, we might have the following pre-conditions:
- an available place to meet
- a time to meet
- availability of the people to meet
- a topic or agenda
Standards[edit]
These standards are used from the IB Computer Science Subject Guide[2]
- Identify pre-planning in a suggested problem and solution
- Explain the need for pre-conditions when executing an algorithm
References[edit]
- ↑ http://www.flaticon.com/
- ↑ IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.