Logout

4.1.19

Construct an abstraction from a specified situation.

 

Teaching Note:

There is no need to use code.

Levels of abstraction through successive decomposition.

A school can be decomposed into faculties. A faculty can be decomposed into departments.

LINK Thinking ahead, thinking procedurally. Connecting computational thinking and program design, introduction to programming.


 

Sample Question:

sdfsdfsf

JSR Notes:

For sure rather than focusing on the pure meaning of abstraction here, within the context of IB CS this assessment statement is rather more geared toward the OOP practice of decomposition of a big problem into classes, and sub-classes, and then each class decomposed in turn into specialized methods. So, going back to 4.1.17, this is more the "things/data" side of abstraction.


Examples of Constructing (non-Computer) things/data Abstraction

Other examples, besides the Teaching Note one:

 

Examples of Constructing Java data Abstraction

Other examples, besides the Movie database example from before:

 

 

Extra: Abstract Classes and Methods

But, really, to "Construct an abstraction from a specified situation", it does makes sense to also go a step further than IB CS requires, and look at how you construct a "problem/process" abstraction that we talked about through half of 4.1.17. And as we saw there with an actual Java programming example is how you actually construct abstract methods in an abstract class.

So as a narrative review, an abstract class and, particularly it's abstract methods, are pure "focus on the essentials, disregarding the details". This is because an abstract method is no more than an idea of what that method should do; it is, in fact, only a method header. It includes a return type and parameter list, but that's it, no implementation at all. The intent (indeed requirement in Java) is that further on down the inheritance hierarchy, a class which extends that abstract class will implement the abstract methods. This does get a little bit involved, and requires a fundamental understanding of inheritance, so rather than include an example here, remind me to code with you an example of this.

Simple Examples of Constructing Java Abstract Class & Methods back in 4.1.17.