Sunday, July 31, 2011

Re: [discussion_vu] CS304 SOLUTION REQ

Hello i am looking for this book 


if any one has please upload.

Thanks

On Thu, Jun 30, 2011 at 3:48 PM, !~*Barsat ki Dhoop*~! <barsatkidhoop@apniisp.com> wrote:


---------- Forwarded message ----------
From: Nisa malik <bc070400208@vu.edu.pk>
Date: Thu, Jun 30, 2011 at 3:27 AM
Subject: Re: [vumasters.com] CS304 SOLUTION REQ
To: vumasters@googlegroups.com




On Wed, Jun 29, 2011 at 11:11 AM, mc100203484 Suleman Shah <mc100203484@vu.edu.pk> wrote:
Asad bhai we r talking about cs304


On Wed, Jun 29, 2011 at 11:01 PM, mc100204328 Muhammad Asad Khan <mc100204328@vu.edu.pk> wrote:


On Wed, Jun 29, 2011 at 9:38 PM, Adnan Majeed <mc100202206@vu.edu.pk> wrote:

Object Oriented Programming (CS304)

Assignment No.4

 

 

 

 

 

Deadline

Your assignment must be uploaded before or on 29th of June, 2011

 

 

Rules for Marking

It should be clear that your assignment will not get any credit if:

o                   The assignment is submitted after due date

o                   The assignment is copied

 

 

Objectives

The objectives of this assignment are,

  • Practically implementing Object Oriented concepts using c++.

 

 

 

Assignment

 

Introduction:

In Assignment No.2 and 3 we added basic code in header and implementation files in the form of necessary attributes with suitable data types along with Constructor, Destructor and Getters/Setters for all data members and all other relevant functions belongs to "Topic" and "Sub topic" classes.

 

In this assignment we will finalize our coding by adding different relations among different classes (lesson, course, study program, topic and sub-topic), and writing main program for our complete sub-system.

 

Note: For two classes "Topic" and Sub-topic" you have already developed full code in last assignment. In this assignment, you just need to relate with other classes mentioned above that you can see and help from object model

 

 

 

 

 

 

Here, just only for the sake to update your knowledge there is a guidelines about different concepts that needs to be implemented in this assignment.

 

 

Associations used in Object Model:

As discussed in previous assignments there are three types of associations that may exist between two classes,

 

·        Simple Association

·        Composition

·        Aggregation

 

 

 

 

Simple Association:

 

·        We say that simple association exists between two classes in our model when there is no intrinsic (dependency) relationship between two classes, however they are taking services from each other, for example a person and a car or a person and a house.

 

We use line to indicate simple Association between two objects as shown below (it may have no arrow head (two way association), or it may be unidirectional (one way association),

When there is some essential relationship (intrinsic relationship) between two objects then we have either Composition or Aggregation between these two objects as described below,

 

 

Composition:

Composition is simply the case when one object is composed of other objects and these objects have no significant independent existence.

 

We use the following symbol for composition,

 

 

Examples of composition include,

 

  1. Computer system and its parts like processor, ram and motherboard
  2. Book and its pages
  3. School bag and its handle and pockets
  4. School and Class
  5. School and Library (considering library is part of school and can not exist independently)
  6. Class and Subjects (as this is school so each class has specific subjects in a college or university a single subjects may be added to different study programs)
  7. Library and Librarian
  8. Grade Book and Subject Marks

 

 

Aggregation:

Aggregation also refers to collection of objects, but in case of Aggregation composing objects have their independent existence as well. Its examples include,

 

 

  1. Library and Books,
  2. School and Teacher(As teacher may exist independently as well)
  3. School and Student(As student may exist independently as well)
  4. Grade Book and Subjects
  5. Student and borrowed book
  6. Teacher and borrowed book

 

 

Note that all these objects have relationship with each other but they may exist independently also, we use the following symbol for aggregation,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Our Object Model is as follows, note that in this model.

 

 

 

 

 

In this assignment, as you need to implement and develop code for "Lesson", Course" and Study Program" classes and finally establish a relationship among all these by taking help from above Object Model (all attributes, functions and relationship is explicitly mentioned respectively).

So, this Object Model is the first and primary guide in order to achieve the desired goals and results.


C++ Implementation

 

Now we see how we can implement these associations present in any Object Model using C++,

 

  1. Composition:

Composition is achieved by adding declaration of object of one class in other object.

  1. Aggregation:

Aggregation is implemented by placing the reference (pointer array) of the aggregating class objects in the class where they are aggregated.

 

We discuss some relations from Implementation point of view,

 

  1. School has many Classes

 

For implementing this relationship we will create objects of type Class in School (equal to number of classes in school). We can do that in School constructor. In school constructor we will ask from user the no. of classes in school and will create an array of Class objects equal to that number. The necessary attributes of each Class object can be set using Class object constructor or for loop and setters methods of each Class.

 

  1. Each Class has many Subjects

 

For implementing this relationship we will create objects of type Subject (equal to number of subjects in that class entered by user). We can do that in Class constructor after setting Class necessary attributes.

 

  1. Each Class has many Students

 

For implementing this relationship we will create objects of type Student in Class object (equal to number of students in that class). We can do that in Class constructor as well.

 

  1. Each Student has Grade Book

 

For implementing this relationship we will create single object of type Grade Book in each Student object. We can do that in Student class constructor.

 

  1. Grade Book has Subject Marks

 

For implementing this relationship we will create objects of type Subject Marks in Grade Book of each student equal to number of subjects in student's class. We can do that in Grade Book constructor.

 

This completes one aspect of system now we move towards library part this part has following relationships,

 

  1. Library has Book

As library aggregates books we will create array of books objects in library class that will independently exist throughout the program.

 

  1. Teacher / Student borrows Book

When teacher or student will borrow book we will set his name in books issued to attribute.

 

  1. Librarian issues Book

When teacher or student will request to borrow some book librarian will issue the book by setting issues to property of Book class.

 

Helping Guidelines:

 

 

  1. It will be better if you go step by step, first add two classes and implement their relationship and then move forward to add one more class and so on…

 

  1. Please before moving towards solution, please have a close view to Object Model and set of guidelines and techniques of how to implement different relationship like Composition and Aggregation between different classes. This will definitely help as it will show how to work in classes and how to implement association relationships and how to create main flow of program. However note that your solution should be better than this as you now have this solution.

 

 

 

Assignment Submission Instructions:

 

You have to upload your complete project folder in zip format.

 


--
Best Regards
Adnan Majeed
MCS(Virtual University of Pakistan Lahore)


--
For Download all kind of Past Solved Papers Just visit:
http://vumasters.com/Papers%20Library/index.php
For discussion your problems just join our forum:
www.forums.vumasters.com
For Chatting with VU students just join:
www.chat.vumasters.com
For all kind of material that helps vu students
in improving their studies like ebooks, lectures, software etc
Just Tune:
www.vumasters.com
 
We hope that you will find us helpful

--
For Download all kind of Past Solved Papers Just visit:
http://vumasters.com/Papers%20Library/index.php
For discussion your problems just join our forum:
www.forums.vumasters.com
For Chatting with VU students just join:
www.chat.vumasters.com
For all kind of material that helps vu students
in improving their studies like ebooks, lectures, software etc
Just Tune:
www.vumasters.com
 
We hope that you will find us helpful



--

Uroj Tujhe KHUDA kuch esa ataa kare,
K rashk Teri qismat pe aftab kare,
Hr mor pe hon farishto k lashkar sath sath,
Har mor pe Teri hifazat KHUDA kare
Ameen.
           ~Rising $tar~

--
For Download all kind of Past Solved Papers Just visit:
http://vumasters.com/Papers%20Library/index.php
For discussion your problems just join our forum:
www.forums.vumasters.com
For Chatting with VU students just join:
www.chat.vumasters.com
For all kind of material that helps vu students
in improving their studies like ebooks, lectures, software etc
Just Tune:
www.vumasters.com
 
We hope that you will find us helpful



--
paa lenay ki khushi pal bhar ki hoti h mgr kho denay ka mlaal umer bhr rehta h
SO yah mat socho k zindagi mn kitny
pal hein yah socho k aik pal mein kitni
zindageyan hein!!!!!!

*NISA_M@llik*
    


--
For Download all kind of Past Solved Papers Just visit:
http://vumasters.com/Papers%20Library/index.php
For discussion your problems just join our forum:
www.forums.vumasters.com
For Chatting with VU students just join:
www.chat.vumasters.com
For all kind of material that helps vu students
in improving their studies like ebooks, lectures, software etc
Just Tune:
www.vumasters.com
 
We hope that you will find us helpful

--
You received this message because you are subscribed to the Google Groups "Virtual University of Pakistan" group.
To post to this group, send email to discussion_vu@googlegroups.com.
To unsubscribe from this group, send email to discussion_vu+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/discussion_vu?hl=en.

--
You received this message because you are subscribed to the Google Groups "Virtual University of Pakistan" group.
To post to this group, send email to discussion_vu@googlegroups.com.
To unsubscribe from this group, send email to discussion_vu+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/discussion_vu?hl=en.

No comments:

Post a Comment

PAID CONTENT