[try Beta version]
Not logged in

 
Whats Abstraction

Apr 22, 2019 at 10:59pm
Its required for my project and but I cant figure out what it is
Apr 22, 2019 at 11:42pm
I have to make a program using C++ for my AP class. There are a bunch of requirements for it though and one of them is that it needs to have an algorithm that has two algoritms inside of it, one of which has to function independently. It also has to have an abstraction
I don't know what it is, either. I mean, I know what "abstraction" is, but I don't think I understand what this is asking for.

Are you translating the assignment? If so, maybe it would help if you post the original, verbatim.
Last edited on Apr 22, 2019 at 11:42pm
Apr 23, 2019 at 8:59pm
No I just need a good definition, all the stuff I've been getting so far were BS and my teacher was no help. Also an example wouldn't hurt too :)
Apr 23, 2019 at 10:03pm
I really don't think a definition will help, but here you go: https://en.wikipedia.org/wiki/Abstraction

Like I said I don't understand what that's asking for. If you have any more information, that would help,
Apr 23, 2019 at 10:43pm
Also an example wouldn't hurt too :)

If it helps: http://pages.cpsc.ucalgary.ca/~sheelagh/personal/reps/bulls/
Got it? Some more? Here: http://pages.cpsc.ucalgary.ca/~sheelagh/personal/reps/
Here one from me: http://www.cplusplus.com/forum/general/252307/#msg1110816
There you find a class Shoe which contains void shuffle(). It consists of i) an information for the user about what's happening and ii) doing it.
1
2
3
4
5
    void shuffle()
    {
        cout << " new deck, shuffle... ";
        cf.set();
    }

This is abstraction, reduced to the max.

(It iis only the representatipon of a new deck, the "shuffling" happens when cards are dealt randomly.)
Apr 23, 2019 at 11:12pm
closed account (z05DSL3A)
"The essence of abstractions is preserving information that is relevant in a given context, and forgetting information that is irrelevant in that context."
– John V. Guttag

Topic archived. No new replies allowed.