50 likes | 126 Views
Real computer projects involve multiple classes and complex details, making it hard to remember everything. By applying the "Divide & Conquer" approach, we break down problems into simpler sub-problems to solve. Similarly, cars are designed using abstraction and modularisation, with each part like engine and tyres being designed separately. Abstraction helps focus on the big picture, while modularisation divides problems into manageable parts. Learn how these concepts complement each other in Java programming.
E N D
Real computer projects are made of many classes. • Cannot remember all the details of a complex problem • We “Divide & Conquer” by breaking up the problem • By splitting the problem up into simpler sub-problems we reduce the complex problem into a group of simple problems that we can solve.
A Car is made of many parts • A company designing a car will need to think about body shape, seats, engine, wheels. • The engine will need to be designed in more detail • Spark plugs will need to be designed • Tyres will also need to be designed. • Designer of the wheel will just take the minimum information about the tyres that are needed for the design. • Likewise the engine design will only take the specification of the spark plug • This is called abstraction
Cars are manufactured by modularisation • Since no-one can keep all the details required to construct a car, it is divided into modules small enough to handle. • Modularisation and Abstraction complement each other • Modularisation breaks the problem into manageable parts • Abstraction is the ability to ignore the details for the big picture.
Modularisation in Java is the creation of objects. Abstraction is a hierarchy of objects