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.

Object Oriented Programming (CS304)

Assignment No.2

 

Deadline

Your assignment must be uploaded before or on 29th November, 2012

 

Rules for Marking

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

 

  • The assignment is submitted after due date.
  • Make sure your assignment solution is not copy pasted or modified from any source such as website, other students, groups, forums etc. Zero will be awarded straightaway and no further request will be entertained in this regard in any case. We may be lenient while giving attempts marks but no relaxation will be given for copied or modified assignments.
  • The assignment submitted in a format other than .cpp.

 

 

Objectives

The objectives of this assignment are, giving the idea of practical implementation of basic object oriented concepts like:

  • Composition
  • Aggregation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Assignment:

You are required to provide a practical implementation in C++ for the following class diagram. You have to provide the solution in the form of classes in C++.

 

 

Class Diagram for Assignment No. 2

 

Figure 1: Object Model of Property Portal

 

 

Detail Description:

You are required to give C++ implementation of following classes:

 

  1. 1.      PropertyPortal
  2. 2.      PropertyType
  3. 3.      Commercial
  4. 4.      Residential

 

Following is the description of all data member and member functions of respective classes:

 

v     Data members for PropertyPortal:

 

  • NoOFUsers: This data member will be used to know the total number of users which visited this site/portal.
  • Name: Property portal will have some name; you can name it as VU-Real-Estate. 
  • UAN: Property portal will have some universal access number such as 111-111-111. 

 

v     Methods for PropertyPortal:

  • Constructor(s) and destructor.
  • Setter and getter function for NoOFUsers, Name, and UAN data members.
  • getPropertyInfo() will take information about property type, property belongs to which city and all other details which are available in PropertyType class.

 

v     Data members for PropertyType:

  • City: User will input city in which he/she want to search property details.

 

v     Methods for PropertyType:

  • Constructor(s) and destructor for class.
  • Setter and getter function for city data member.
  • getPropertyType() will ensure whether property is a commercial property or it is a residential property. A property can’t be both at same time.

 

v     Data members for Commercial

  • PropertyValue: Will show some fixed value for the commercial property.

 

v     Methods for Commercial

  • Constructor(s) and destructor for class.
  • Setter and getter function for PropertyValue data member.
  • getPlot() will return a plot number.

 

v     Data members for Residential

  • PropertyValue:  Will show some fixed value for the Residential property.

 

v     Methods for Residential

  • Constructor(s) and destructor for class.
  • Setter and getter function for propertyValue data member.
  • getPropertyCategory() This method will check for property category if it is a plot then it will return true else will print an appropriate message.  

 

Important Points:

 

  1. You also have to show the relationship (inheritance, association, aggregation, composition) between classes in proper C++ syntax with comments. No marks will be given for incorrect relationship.
  2. Dynamically allocate memory where required.
  3. Implement all member functions of each class. Make sure you use most appropriate return types and signatures for the function.  
  4. Implement constructors of all classes (Overload constructors if required also can use copy constructor if required).

 

 

Note: You are required to submit only .cpp file. Word document or any other file format will award you 0 marks straight away.

Views: 17959

Attachments:

Replies to This Discussion

plzzzzzzzz upload the correct solution

mam is it necessary to run the program ?? without any error press F9 ??? if it is? then the output shows what so kindly show k cmd image thnxx

pari is assignment ko c++ pay bana hai i dont think kay yeh ideal solution jis say help milay what u say

pari can i get ur email address to check my assignment whether it is correct or not

Dear Pari, The below code is correct ? Plst guide me..Thanks

class PropertyPortal
{
      Private:
              NO of Users (Char *NOOfUsers);
              UAN *UAN;
              Name *Name;
      Public:
             Void getProperyInfo();
};

For each class i made like this and i dont know at the end what should i write to show, i mean Cout ?

main ()
{
cout"This is just a prototype of all classes";
coutendl;
system("PAUSE");

}

Pari !!!! Please let me know my Mistakes and guide me Kindly :)

#include <iostream.h>
#include <string.h>   
#include <stdlib.h>   

using namespace std;

Class PropertyType;
class PropertyPortal;
class Residential;
class Commercial;

class PropertyPortal
{
      Private:
              NO of Users (int *NOOfUsers);
              UAN (char *UAN);
              Name (char *Name);
      Public:
             Void getProperyInfo();
};
Class PropertyType
{
      Private:
              City *City;
      Public:
             void getPropertyType();
};
Class Commercial
{
      Private:
              PropertyValue *PropertyValue;
      Public:
             void getPlot();
};
Class Residential
{
      Private:
              PropertyValue *PropertyValue;
      Public:
             void getPropertycategory();
};
main ()
{
cout"This is just a prototype of all classes";
coutendl;
system("PAUSE");

}

AoA

mth ka tough sy tough question b ho to i can handle butt cs??????????

plz share the correct solution via e-mail. i promis to do some ammendment in that to differentiate from the given solution.

So plz post it at my mail adress

irfanbutt44@gmail.com

pari ji , above idea is good but can u put some more details in coding for better understanding

yr mj tu problem hoi problem hn

bari mahr bani ap ny bana le h tu saweb kama laen mj send kr den

Hum Pakistani Peoples Kyn Mojzoon ki talash main rehtay hain ....

OR

Wants success on others Efforts.. Please wake UP and Work Hard !!!! Sorry dont mind pls :)

plz solution upload kar dain plz thanks

RSS

Looking For Something? Search Below

Latest Activity

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