+ 1
What is abstraction?
Give a example as well..
4 Respuestas
+ 7
Abstraction is when you sum up code and reduce it to its essence, to make it simpler.
Instead of having to write billions of 0 and 1, you have assembler commands that sum up a few things that come up over and over.
Languages like C reduce this still annoying procedure to something that resembles English somewhat and allows you to use human logic with stuff like loops, conditions and functions.
Also you have types. If you put a number into an int, it will come out as a number, if you put it into a char, it will be interpreted as a letter.
In object-oriented languages, you can bundle up functions and data to something that behaves like a thing in real life: Although there's a lot of stuff going on in the background, Python's lists feel like boxes where you can put stuff into, take it out, sort it...
Also most of the stuff that can be messy about C types, like that numbers are of a limited size, is coded away for you: Numbers can go as high as you want, you don't even have to know how.
Get a feeling yet?
+ 7
Check abstraction in java with example..
https://howtodoinjava.com/oops/understanding-abstraction-in-java/
+ 4
Abstraction is when you buy a steak instead of making it yourself from grass with chemisty.
It's when you use a gas pedal in a car instead of blowing air into the engine.
It's when you use a watch with an hour and minute arm instead of counting how often the pendulum swings.
0
Very helpful 👍