விளம்பரத்தை ஒரு கிளிக் செய்யுங்கள் Earn upto Rs. 9,000 pm checking Emails. Join now!
Earn upto Rs. 9,000 pm checking Emails. Join now!

Friday, February 24, 2012

Real world Example of Abstraction


Abstraction:

Abstraction is "To represent the essential feature without representing the back ground details."

Abstraction provides you a generalized view of your classes or object by providing relevant information.

Real world Example of Abstraction: -

Suppose you have 3 mobile phones as following:-

Nokia 1400 (Features:- Calling, SMS)

Nokia 2700 (Features:- Calling, SMS, FM Radio, MP3, Camera)

Sony Ericsson (Features:-Calling, SMS, FM Radio, MP3, Camera, Video Recording, Reading E-mails)

Abstract information (Necessary and Common Information) for the object "Mobile Phone" is make a call to any number and can send SMS."

so that, for mobile phone object you will have abstract class like following:-

abstract class MobilePhone

{

public void Calling();

public void SendSMS();

}

public class Nokia1400 : MobilePhone

{

}

public class Nokia2700 : MobilePhone

{

public void FMRadio();

public void MP3();

public void Camera();

}

public class Sony Ericsson : MobilePhone

{

public void FMRadio();

public void MP3();

public void Camera();

public void Recording();

public void ReadAndSendEmails();

}

Abstraction means putting all the variables and methods in a class which are necessary.

For example: - Abstract class and abstract method.

Abstraction is the common thing.

example:

If somebody in your collage tell you to fill application form, you will fill your details like name, address, data of birth, which semester, percentage you have got etc.

If some doctor gives you an application to fill the details, you will fill the details like name, address, date of birth, blood group, height and weight.

See in the above example what is the common thing?

Age, name, address so you can create the class which consist of common thing that is called abstract class.

That class is not complete and it can inherit by other class.

Share/Save/Bookmark

8 comments:

Anonymous said...

Its such as you read my mind! You appear to know so much about this, such as you wrote the e book in it or something.

I believe that you simply could do with some percent
to power the message home a little bit, however other than that, that is
great blog. A fantastic read. I'll definitely be back.

Also visit my web-site ... capture data from website

Anonymous said...

The particular electronic cigarette ego basic starter kit is
fantastic for new users. So, follow the battery power saving tips above to
get the most bang for your buck. If a LED is used instead of a bulb, the connections will require a bit more attention.


Here is my site onlineradio

Anonymous said...

Literally wiping sweat from my forehead after doing my best 90s
dance moves to a memorable mix of old school joints from the likes of Special Ed, Eric
B. Another consideration when choosing your software is whether you will be connecting to a single stream or multiple
streams. Individuals have acquired different software and programe through which you could download these videos.


my web-site ... Skip Navigation

Anonymous said...

we, supposed, was that will attract the neighbouring blacks.
Father arrived at Melbourne a very sick man, and the man immediately underwent treatment by
specialists for his throat trouble. Good fishing ended
up being be been in this river each of the year round, even
during flood-time, so when the lake was clear fish could be
seen taking the bait in a depth of 10 feet.

Check out my web site ... info on the pirate bay trial

Anonymous said...

Quality articles or reviews is the key to interest the viewers to pay a quick
visit the site, that's what this website is providing.

Check out my site: http://tadalafileu.it/

Anonymous said...

But over the past few years, IPTV has dwarfed the grade of DVD and Cable TV.
By doing this, you're reinforcing that negativity and attracting to yourself MORE. Trading invites numerous sites is very frowned upon in the exclusive Bit - Torrent community since it allows anti-piracy groups to infiltrate private trackers with less effort.

Feel free to surf to my web blog; pirate bay proxy

Anonymous said...

You can watch the latest weather updates by
just taking a glance at your phone's home screen, where it automatically posts weather info, and
all sorts of without having to launch the application.
By the process, you are reinforcing that negativity and attracting to yourself MORE.
Now, movies aren't one and only thing that piracy
trackers allow links too.

My blog post - torrent proxy

Anonymous said...

Much is considered and written about the crimes committed from the aborigines from the white man, nonetheless it has to be
remembered that the blacks were given great provocation.
Nash, who had received a gigantic claim in reward for his discovery,
could possibly be seen virtually any day busily at work.

Finding the Venus reef abandoned he went for the Four Mile, two miles distant, and discovered about fourteen
Chinamen camped there.

Here is my weblog: torrentspy news

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

Blog Widget by LinkWithin
 

Copyright Notice

All Rights Reserved. Copyright of articles belongs to the blog owner. Reproduction of articles in any form without prior permission of blog owner is prohibited. Don't miss a single post. Please add this site's RSS feed in Google Reader or any other RSS reader and avoid disappointment when there is no new post.
Page copy protected against web site content infringement by Copyscape

Rss Feed

Posts Comments

My Followers

There was an error in this gadget

Computer Bird Copyright © 2009 Flower Garden is Designed by Shiyamsena