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

+!!! Annie !!!+ liked + M.Tariq Malik's group EDU302 Human Development and Learning
4 minutes ago
+!!! Annie !!!+ liked №Oř's group Novels and Famous e books
4 minutes ago
+!!! Annie !!!+ liked + M.Tariq Malik's group CS204 Cyber Law
4 minutes ago
+!!! Annie !!!+ liked + M.Tariq Malik's group EDU433 Professionalism in Teaching
5 minutes ago
+!!! Annie !!!+ liked + M.Tariq Malik's group EDU654 Addressing problems of learning through technology and pedagogy
5 minutes ago
+!!! Annie !!!+ liked + M.Tariq Malik's group EDU630 Research Project - Education
5 minutes ago
+!!! Annie !!!+ liked + M.Tariq Malik's group TPT620 Teaching Practice (Long Term)
5 minutes ago
Ahad Kharal replied to + M.Tariq Malik's discussion CS625 Professional Practices Assignment No 01 Fall 2019 Solution & Discussion in the group CS625 Professional Practices
16 minutes ago
Ahad Kharal joined + M.Tariq Malik's group
16 minutes ago
DANI added a discussion to the group MGT101 Financial Accounting
20 minutes ago
abdul ghafoor replied to + M.Tariq Malik's discussion PSY404 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 20-11-2019 in the group PSY404 Abnormal Psychology
21 minutes ago
abdul ghafoor replied to + M.Tariq Malik's discussion PSY404 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 20-11-2019 in the group PSY404 Abnormal Psychology
22 minutes ago
Profile IconAli Haider, samar bilal and + '' Tanveer '' joined + M.Tariq Malik's group
29 minutes ago
ALEENA replied to + M.Tariq Malik's discussion How to Prepare The Mid Term Exams & Study in VU
34 minutes ago
Isha Chuhdary updated their profile
35 minutes ago
ALEENA replied to + M.Tariq Malik's discussion How to Get Full Marks In Quiz
43 minutes ago
ALEENA liked + M.Tariq Malik's discussion How to Get Full Marks In Quiz
44 minutes ago
ALEENA replied to +¢αяєℓєѕѕ gιяℓ's discussion Kya Mien Writer Ban Sakti Hoon :-P
52 minutes ago
Misha Rajpoot liked + M.Tariq Malik's group MTH202 Discrete Mathematics
57 minutes ago
Abdul Hadi joined + M.Tariq Malik's group
58 minutes ago

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

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