- What is the purpose of abstraction in a program?
- The purpose of abstraction is to filter out information that is not necessary to solve the problem, so that only essential information is included. The benefit is that the solution is easier to design, implement and solve. Abstraction filters out information that the problem does not need.
- What is the difference between abstraction and decomposition?
- Abstraction filters out information that is not necessary to solve the problem. Decomposition is breaking a problem down into sub-problems, which leads to the program being designed as a series of modules (procedures / functions). They are different processes, and a good answer keeps them apart.
- How do I choose which items an abstract model should store?
- Read the scenario and choose the items the new module needs. Give each item a justification: say what the module does with it. For example, mobile phone number is needed to send the text message. An item that is not required should be left out, with a reason, such as postal address not being required because the module is sending an email, not a letter.
- What are the benefits of decomposition?
- Breaking a complex problem down makes it easier to understand / solve. Smaller problems are easier to program / test / maintain. Sub-problems can be given to different teams / programmers with different expertise and can be solved separately. Each benefit needs a reason, not just the word easier.
- How do I name and describe the sub-modules of a decomposed program?
- Give each sub-module a name and its use. For example, IdentifyMember() has the use of identifying a club member who has expressed an interest in a given class. A good name is not enough: the use must say what the sub-module does.
- Is abstraction the same as hiding data from the user?
- No. Abstraction filters out information that is not necessary to solve the problem, so that only essential information is included. Many students confused the processes of abstraction and decomposition, and some referred to hiding data from the user or to user-permissions, which is not abstraction.