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- Object Oriented Programming.Assignment No. 03 SEMESTER Spring 2013.due date : 20/05/2013

Assignment No. 03
SEMESTER Spring 2013
CS304- Object Oriented Programming

Total Marks: 20

Due Date: 20/05/2013

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

  • The assignment is submitted after due date.
  • The submitted assignment is other than .cpp file.
  • The submitted assignment does NOT open or file is corrupted.
  • The assignment is copied (from other student or ditto copy from handouts or internet).

Uploading instructions

 

  • For clarity and simplicity, you are required to Upload/Submit only .CPP file

Objective

The objective of this assignment is:

 

  • To give you the idea of practical implementation of some concepts like, definition of classes, Data members, member functions, Aggregation, Composition, Constructors etc.

 

For any query about the assignment, contact at CS304@vu.edu.pk

GOOD LUCK

 

Marks: 20 

 

 

 

Composition and Aggregation is an important relationship between objects in object oriented paradigm. Consider the following class diagram, which shows some classes and their relationship (Composition and Aggregation), while the detail of classes is given in the table.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Class Name

Attribute Name

Attribute Data Type

Functions

Sign

Name

Character String

-Constructor

 

 

 

-Getters and Setters

Candidate

Name

Character String

-Default constructor()

 

Votes_obtain

Integer

-Overloaded Constructor

 

sign

Sign

-Getters and Setters

 

 

 

-Count_votes()

Constituency

ConNo

Character String

-Default constructor()

 

Candidate_name

Cadidate

-Overloaded Constructor

 

 

 

-Getters and Setters

Result

DayOf_result

Character String

-Default constructor

 

 

 

-Getters and Setters

 

 

 

-compile_result()

VB_Paper

CanName

Candidate

-Default constructor

 

res

Result

-Overloaded Constructor

 

 

 

-Getters and Setter

 

 

 

-Get_result()

 

You are required to implement this class diagram (Write complete program) in to C++ with all functions and concepts (Aggregation and composition) given in the class diagram/table.

 

You need to consider that there may be two or more than two candidates who can contest in the constituency.

 

Details of important Member functions:

 

Count_votes(): This function will count votes of each candidate.

 

compile_result() : This function will Compile (calculate) the result of the contesting candidates.

 

Get_result(): This function will get/show result from the Result class through the part object “res” of the VB_Paper class.

 

 

 

 

 

 

 

Output:

 

 

Lectures Covered:  This assignment covers Lecture #    07-15

Deadline:             Your assignment must be uploaded/submitted at or before. May 20, 2013

 

Views: 7883

Attachments:

Replies to This Discussion

Please Discuss here about this assignment.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.

plzz start disc

kuch nai ata kya discuss karay 

aik idea dy ye 3rd assignment sir ky send kya hoya solution main hi banani hn na us ko hi change karna hn

Write in this way

Class Vb_paper{

Public:

……….

Private:

};

class Candidate : public Vb _Paper

{

Public:

……….

Private:

};

And so on

mera khyal hia k ye simple hia but iss me composition ur agrreigation ka concept b use krna hia.. jo k aap ne nhi kia ibrahim touqeer... wsse mene abbi sirf dekhi h bnai nhi khud.

kasy solve ho ge yeh

falak kindly app mujy iss ko sumja sakta ho mujy sumaj he nahi a rahi kay karna hy 

okkkk

we want only solutions

please send me cs 304 assignment 

icka output sahi to nahi arha q??????  

RSS

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

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