Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS304 GDB Solution & Discussion Fall 2015

Graded Discussion Board Dated: Jan 25, 16

Dear Students!

Please Note that GDB of CS304 will be launched on Monday, February 01, 2016(01-February-2016) and will last for 48 hours only.

GDB Topic:

Suppose you are working in an IT company that provides services to different education institutes to manage student’s record. Your company is going to launch a new project which requires saving information about student. Student information may include information related to their assignments, quizzes and exam marks or any other problem that student face in any course etc. Saved information can then be used later to analyze student data and find reasons if any student is not getting good marks. It is recommended to save the student records in different formats like saving in database, text files, xml and few others. Saving information in different formats will help the institutes analyze information as per their convenience. This information will be easily available to integrate with any application, institute is already using.

You are already working on this project as a software engineer in the company. . You know, there are different mediums to save the information like Save to DB, Save to File, etc. Similarly some other methods can be remove from file, remove from DB etc.

Now the student class can be implemented in two ways:

Either you can write abstract class with virtual functions like SaveToFile(), SaveToDB(), RemoveFromFile(), RemoveFromDB()etc.

You can develop an interface with declarations of the above mentioned functions.

Alternatively you can implement both in parallel. Which option will you adopt? Justify your answer with logical reasons.
Note: Try to provide precise, to the point answer and avoid irrelevant details.

Views: 5566

Replies to This Discussion

Please Discuss here about this GDB.Thanks
Our main purpose here discussion not just Solution
We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

koi  concept to dien assignment related//?

A.O.A please Tariq Bhai GDB solved kernay me Help ker do k as me kya concepts hai or solid reason  bi explain ker dya 

interface class is best option rather then abstract class. is it correct?

Interface class is best abstract classs k aap na khah correct hai tu as koi solider reasons be explain karay k y kasay best hai 

hmm i thnk abstract clas best ha,, interface ni.. bcz interface me sb kch show krna hota ha,,,irrelevent material b,,r abstract me jst relevant. abstrct se tym b bch jta ha...

kya khyal ha...koi solid reasons btaye

When to use abstract classes instead of interfaces and extension methods in C#?
When I read and looked at codes using Abstract classes, I was able to justify it because it allows you to add common methods for any subclasses extending the abstract class. So for example, if objects behavior is similar, I would use Abstract classes to implement bodyless abstract methods that is required for each object, and simply use non abstract methods already implemented in the abstract class. I can think of a scenario dealing with multiple media file types (avi,mpg,mp4) and you would have common methods for all files, as well as media specific abstract methods that needs to be implemented.
However, I am a bit confused as to why you would knowingly create an interface which cannot contain any non-abstract methods. Reading this page, it states that it hides information (you mean the abstract methods?).
Hiding details and providing common interfaces is called encapsulation, which is an analogy from making an object look like it's covered by a capsule (the interface in this case). This allows two objects differing in internal representation but having the common interface interchangeably usable (called interchangeability). Interfaces also allow to facilitate the use of data structure and guard the state of the object from invalid inputs and modification of the structure.

Wasifa Baig (MIT **)  good research. now abstract class will be use? 

Wasifa Baig (MIT **) good brilliant guy 

 decant Boy BSc. CS 3rd Sem thanks for that .it's really helpful ...good luck 


Agar concept galt hai tu batao



      According to this statement Abstract class is better than interface because Abstract classes can have implementations for some of its members, but the interface can't have implementation for any of its members and also it contains encapsulation. Abstract class contains the data member and member function. Interfaces cannot have fields where as an abstract class can have fields. An interface can inherit from another interface only and cannot inherit from an abstract class; where as an abstract class can inherit from another abstract class or another interface. A class can inherit from multiple interfaces at the same time, where as a class cannot inherit from multiple classes at the same time. Abstract can have access modifiers where as interface members cannot have access modifiers.


Looking For Something? Search Below

Latest Activity

saba zulfqar and Hania Khalid Shariff are now friends
1 hour ago
Muhammad Kasim replied to Sunny's discussion fin622 MCQS needed
2 hours ago
Profile IconMuhammad Kasim and shahzad Hussain joined Virtual University of Pakistan
4 hours ago
Mr Siren Head replied to Hania Khalid Shariff's discussion zero semester
6 hours ago
Hania Khalid Shariff and Huma Ahmad are now friends
16 hours ago
Huma Ahmad liked Hania Khalid Shariff's profile
17 hours ago
BBA(6th smes) left a comment for Rimsha mujahid
17 hours ago
Rimsha mujahid replied to + Audit Officer's discussion Accounts first smester
18 hours ago

VIP Member Badge & Others

How to Get This Badge at Your Profile DP


Management: Admins ::: Moderators

Other Awards Badges List Moderators Group

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

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