We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

In programming languages, an abstract class is a generic class (or type of object) used as a basis for creating specific objects that conform to its protocol, or the set of operations it supports. Abstract classes are not instantiated directly.

Abstract classes are useful when creating hierarchies of classes that model reality because they make it possible to specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class (a derived class) is needed.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 370

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Very much simple example of abstract class is real life example of Printer, Car.

Printer or Car it self is nothing but you have some abstract definition in mind that something which do like this (print on paper thru some electric/mechenical operation). so anything which has print functionality will call a printer. what the non abstract things of printer are

LaserPrinter

ColorPrinter

DotMatrixPrinter

but Printer is abstract there is nothing in this world called Printer.

Same is Car. car is an abstract idea what the real type u may find is

AUtomaticCar

ManualCar

or

DeisleCar

PatrolCar

so car it self is abstract thing. you can say abstraction is a template. anything which will look like that particular template Car will called a Car and anything which will look like the template Printer will call a Printer.

through Abstract classes we achieve Polymorphic behavior means polymorphisom.

which means a functionality behave differently in dfferent classes but in a same hierarchy. 

printing is functionalty of Printer

but 

LasterPrinter print differently 

ColorPrinter print differently 

LaserPrinter print differently 

Same accelrate,  break, changeGear is functionality of a Car

AutomaticCar does samething differently than ManualCar

so accelrate, break and changeGear are polymorphic function

and the statement i mentioned "in a class hierarchy" means AutomaticCar is in hierarchy of Car and manualCar is also in hierarchy of Car.

but LasterPrinter is not hierarchy of Car class this is in hierarchy of Printer class

let see a another real world example of polymorphic behavior suppose you have open 3 document in MS Word

but there is only one SAVE button above.

this save button has polymorphic behavior because it will work only for that document which is currently open. 

when u switch to other document it will start working for that particular document.

so Concluded that abstract class never exist in world while its a template , which class will follow that template will become that class this behavior also calssed IS-A 

LaserPrinter IS-A Printer

AutomaticCar IS-A Car

etc

Thanks for reading 

please tell about overloading and overriding?

RSS

Latest Activity

+ !!!R❤G liked + !!!R❤G's discussion Ikhalaq ki ahmiyat
55 minutes ago
+ !!!R❤G posted a discussion
56 minutes ago
+ !!!R❤G liked UMER UMER's discussion What is Love?
1 hour ago
+ !!!R❤G liked + IUUOƆƎUT +'s discussion کہو تو لوٹ جاتے ہیں ۔ ۔ ۔
1 hour ago
+ !!!R❤G liked + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
1 hour ago
+ !!!R❤G liked UMER UMER's discussion What is Love?
1 hour ago
+ !!!R❤G liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
1 hour ago
+ !!!R❤G liked +! ! ! "Asнтαℓғαн's discussion Happy wala Birthday tashy patashy ❤ (Tasha)
1 hour ago
+ !!!R❤G liked 彡JK彡 ❤️'s discussion Don't Look for Perfection........ LOVE lies in imperfection
1 hour ago
+ !!!R❤G liked 彡JK彡 ❤️'s discussion If you have sOmething stupid to saY............
1 hour ago
+ !!!R❤G liked Waseem Khan's discussion Edu 402 Assinment No. 1 Solution
1 hour ago
+ !!!R❤G liked Moji's discussion MCM301 assignment no 1
1 hour ago
+ !!!R❤G liked + M.Tariq Malik's discussion VU Students Reserves The Right to Delete Any Profile On the Site
1 hour ago
+ !!!R❤G and + ! ! ! ! ! ! ! ! ! AG are now friends
1 hour ago
Zain Arshad replied to + M.Tariq Malik's discussion ENG201 Business and Technical English Writing Assignment No 01 Fall 2019 Solution & Discussion in the group ENG201 Business and Technical English Writing
1 hour ago
Muhammad Rashid liked + M.Tariq Malik's discussion ACC501 GDB Fall 2019 Solution & Discussion
1 hour ago
Sucana Shafiq liked + M.Tariq Malik's discussion CS101 Mid Term Papers Spring 2019 & All Solved Past Papers, Solved MCQs & Helping Material
2 hours ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion CS302 Digital Logic Design Assignment No 02 Fall 2019 Solution & Discussion in the group CS302 Digital Logic Design
2 hours ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion CS302 Digital Logic Design Assignment No 02 Fall 2019 Solution & Discussion
2 hours ago
+ ! ! ! ! ! ! ! ! CuTe DrAmA updated their profile
2 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service