We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Correct and Final Solution of Assignment No.3 Of CS201 Due Date 14 Jan 2013 Solved by Waqas Rasheed

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 4136


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

bro will u please upload .cpp file?

No. ap khud lilkhoo. theek likhoo compile na hoto mai zimmadaar hon

jo loog solution ko ghalaat bata rahe hien .. after deadline mai ccp file b de do ga.. phr chck kar lena.. solution theek tha ya nahi..ya ap sirf ap ke mistake the

yar end kese krna hai

yeh lo aur mooj maro 


This is wrong solution...

Correct solution is this

check it geys.. just run it on devc++


Rao Usman

its a wrong solution becasuse of you did not dynamaclly allocate the memory..

my solution is 100% correct

using namespace std;



class Vehicle{
      private:string company;
              string model;
              double year;
              double engineCapacity;
              void setCompany(string cmp)
              {company = cmp;
              string getCompany()
                     return company;
              void setModel(string md)
                   model = md;
              string getModel()
                     return model;
              void setYear(double yr)
                   year = yr;
               double getYear()
                return year;      
                void setEngineCap(double eCap)
                     engineCapacity = eCap;
                double getEngineCap()
                       return engineCapacity;

Vehicle *ptr;
      int numVehicle;
      void getInput()
      {cout"Enter number of vehicle:";
           ptr = new Vehicle[numVehicle];
           for(int i=0;i<numVehicle;i++)
           {string Cmp;
                   cout"\n\nVehicle "i+1endl;
                   cout"Enter the name of Vehicle maker company :";
                   string md;
                   cout"Enter Vehicle model :";
                   double rg;
                   cout"Enter year of registration:";
                   double egC;
                   cout"Enter engine of thr Vehicle:";

void display()
{ for(int i=0;i<numVehicle;i++)
      cout"\nCompany :"ptr[i].getCompany()endl;
      cout"\nModel: "ptr[i].getModel()endl;
      cout"\nEngine Capacity in CC:"ptr[i].getEngineCap()endl;

               company = "ABC";
               model = "xyz";
               year = 2009;
               engineCapacity = 1000;
      { cout"\nObject deleted\n";
                 int main()
                     Vehicle obj;
                     delete[] obj.ptr;
                        //by Emran Haakim


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

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