- Back to Home »
- CS304 Assignment no 3 Spring 2013 Full Solution
Posted by : Anonymous
Saturday, 18 May 2013
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: [IMG]file:///C:/Users/VIRTUA~1/AppData/Local/Temp/msohtmlclip1/01/clip_image005.jpg[/IMG] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Lectures Covered: This assignment covers Lecture # 07-15 Deadline: Your assignment must be uploaded/submitted at or before. May 20, 2013 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [IMG]file:///C:/Users/VIRTUA~1/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif[/IMG] | 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: o The assignment is submitted after due date. o The submitted assignment is other than .cpp file. o The submitted assignment does NOT open or file is corrupted. o The assignment is copied (from other student or ditto copy from handouts or internet). Uploading instructions o For clarity and simplicity, you are required to Upload/Submit only .CPP file Objective The objective of this assignment is: o 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. [IMG]file:///C:/Users/VIRTUA~1/AppData/Local/Temp/msohtmlclip1/01/clip_image003.jpg[/IMG]
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: [IMG]file:///C:/Users/VIRTUA~1/AppData/Local/Temp/msohtmlclip1/01/clip_ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||