Abstract
Data Abstraction
Deliberation is "addressing the necessary property without addressing the back ground depiction." Reflection permits you to zero in on how the item performs all things being equal. Deliberation gives a summed up perspective on your classes or articles by furnishing you with important data. Amaranth is the way toward concealing the working of an article and showing the data of an item in a reasonable manner. Genuine model Assume you have an article Mobile Phone. Assume you have 3 cell phones: - Nokia 1400 (Features: - Calling, SMS) Nokia 2700 (Features: - Calling, SMS, FM Radio, MP3, Camera) Dark Berry (highlights: - calling, SMS, FM radio, MP3, camera, video recording, email perusing) Conceptual data (fundamental and general data) for the item "cell phone" can call any number and send SMS. " In this way, for cell phone object you will have conceptual class like the accompanying: - Unique 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 Blackberry: MobilePhone {{ Public void FMRadio (); Public void mp3 (); Public void camera (); Public void account (); Public void ReadAndSendEmails (); } Deliberation implies that it is important to have all factors and strategies in a class. For instance: - Abstract class and conceptual strategy. Deliberation is normal. Models: In the event that somebody in your montage requests that you fill the application structure, you will fill in your subtleties like name, address, birth information, which semester, rate you have gotten, and so on Assuming a specialist gives you an application to fill the subtleties, you will fill the subtleties like name, address, date of birth, blood gathering, stature and weight. See what the above model shares for all intents and purpose? Age, name, address so you can assemble a class that has a typical article called a theoretical class. That class isn't finished and some other class can be acquired.
Also visit: Data abstraction in c++
Comments
Post a Comment