Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position


Join the forum, it's quick and easy

Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position
Virtual Position Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

CS201 GDB solution

View previous topic View next topic Go down

GMT + 3 Hours CS201 GDB solution

Post by Rao Muhammad Aftab Fri Sep 02, 2011 10:12 am

Topic:-

Structures and Classes are very important data structures used in C / C++. You as a programmer has a choice to use any of them
as Structures and Classes do provide features some what similar but only with some differences. Now you are given a task
to code either using Structures or Classes.


Please give your justification in favor or against of any one you will use for coding.
SOLUTION:
Use classes in coding due to the following characteristics.
Structures has only data variables gathered, grouped and named as a single entity, but in classes there are both data members and as well as functions to manipulate data members.
In structures data variables are by default public and are visible to all and every one can change them. But the data members and member functions are by default are private and are not visible to every one. In classed we can make the member functions public to manipulate the data members so these are visible to every one and by making data members private we can hide them. So one cannot change the values wrongly.
Rao Muhammad Aftab
Rao Muhammad Aftab
Monstars
Monstars

Pisces Snake
Posts : 1091
Join date : 2011-02-11
Age : 35

Back to top Go down

GMT + 3 Hours Re: CS201 GDB solution

Post by Shiza Haqqani Thu Sep 08, 2011 12:56 pm

nice 4 share[You must be registered and logged in to see this image.]
Shiza Haqqani
Shiza Haqqani
Monstars
Monstars

Aquarius Horse
Posts : 156
Join date : 2011-05-23
Age : 34
Location : net

Back to top Go down

View previous topic View next topic Back to top


Permissions in this forum:
You cannot reply to topics in this forum