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.

Problem Statement:

 

In continuation of the assignment no. 1, consider the following class diagram (a part from Assignment no. 1 solution), detailed description of the diagram is given in the table.

                       

 

Table:

 

Class Name

Attribute Name

Attribute Data Type

Behavior (Functions)

Company

Comp_Name

Character Pointer

- Default Constructor

        - Profit_Report()

        - Financial_Statement()  

Registration_No

Character Pointer

Transport

Weight

Integer

 

-          Default Constructor

-          Carray_Goods()

Capacity

Integer

Speed

Integer

Land_Transport

Transportation_Mode

Character Pointer

 

-          Default Constructor

Vehicle_Type

Character Pointer

Air_Transport

Aircraft_Type

Character Pointer

 

-          Default Constructor

Aircraft_Name

Character Pointer

 

Length

Integer

 

Room

Width

Integer

 

-          Default Constructor

-           Store()

 

 

 

 

Hall

             Length

Integer

-          Default Constructor

-          Store()

Width

Integer

 

 

 

 

 

You are required to map (implement/Code) this class diagram into C++.

Make sure that your solution must contain ONLY classes’ definitions given in the diagram, definitions of all attributes and proper declaration and definitions of member functions including constructors that are given in the above table.

 

Detail of some Member Functions:

 

Profit_ Report( ):              This function prints the annual profit of the company.

Financial_Statement( ):   This function prints the annual financial statement of the company.

Carry_Good( ):                Each transport has carrying goods functionality.

 

Note:  

  1. The body of all member functions should be empty, while the constructors should have code which initializes the objects.
  2. In main function you may print a simple “cout” statement in order to check your program for syntax errors.
  3. You must also implement inheritance and aggregation.

 

Lectures Covered:  This assignment covers Lecture #    07-10

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

 

Views: 10587

Attachments:

Replies to This Discussion

ap abi help kr de na last date pr qyun help kry gy

Brothers and sisters.

There is a hint.

Read your assignment very carefully.  thrice may be 5 times.

The assinment says DO nothing.

Just print the statements.

But even it says Do nothing.

it demands the framework whiten specifications of class concepts.

have fun. your teacher is very generous.

i m also w8ng last date umer zaman bhai

payaray bhai mei file upload ki hai wesy he bqe assignment bny ge apko hint dy dia hai mei

bhai inheritance or aggregation ka bhe koch btayn... ussay kaisy karna hai kyun k abhi tak wo lectures main btaya nahe hai implementation k reference sy or ass main kaha must karnay ka...!! ajeeb baat hai!!

inheritance codes for base class and child class

base class.

class hotel

{

private:

int alonan;

int sadaNan;

public:

hotel( ){ sadanan=0; aloonan=0;};

class tandoor : public hotel

{

private:

string nanbaiName;

double nanbaiAge;

public:

tandoor(){private data to 0}

this is the way to make a child class if i am wrong let me know please

constructor nay object ko initiate kerna 

jo private members , unko 0 value dena 

Class bakree

{

private:

int rope;

int grass;

public://constructor is a public member of class it initialises pvt mems

bakree( ){ rope = 0; grass = 0;}

constructors are supposed to set the value of privatte data to a known state na so best known state is 0.

  1. The body of all member functions should be empty, while the constructors should have code which initializes the objects.
  2. In main function you may print a simple “cout” statement in order to check your program for syntax errors.

You must also implement inheritance and aggregation

App theek keh rahay ho men nay aisay he head khapay 

UNKO compileable program chahyay jiss men all classes complete hoon.

But bro App yaya poora program banana kiu kay App ko practise ho gi

If poora program bananay ka irada hua Let me know I will give you all hints.

#include<iostream>

#include<conio.h>

using namespace std;

// company Class//

class Company{

// Data Member Defination//

                private:

                char* Comp_Name;

                char* Registration_No;

// Member Function Declaration//

                public:

                                Company();

                                Company(char* Comp_Name,char* Registration_No);

                                 void Profit_report();

                                 void Financial_Statement();

                                ~company();

};

// Transport Class//

class Transport{

// Data Member Defination//

                private:

                                int Weight;

                                int Capacity;

                                int Speed;



// Member Function Declaration//

                public:

                                Transport();

                                Transport(int Weight,int Capacity,int Speed);

                                void Carry_Goods();

                                ~Transport();

};

// Land_Transport Class

class Land_Transport{

// Data Member Definaion

                private:

                                char* Transportation_Mode;
                                char* Vehical_Type;

// Member Function Declaration//

                public:  

                                

                                Land_Transport();
                                Land_Transport(char* Transportation_Mode,char* Vehical_Type);

                                ~Land_Transport();

};

//Air_Transport class//

class Air_Transport{

// Data Member Function//

                private:

                                char* Aircraft_Type;

                                char* Aircraft_Name;


                public:

                                Air_Transport();

                                Air_Transport( char* Aircraft_Type,char* Aircraft_Name);



                                ~Air_Transport();

};

//Class Room//

class Room{

                private:

                                int Length;

                                int Width;

                public:

                                Room();

                                Room(int Length,int Width);

                                void Store();

                                ~Room();

};

//Class Hall//

class Hall{

                private:

                                 int Length;
                                 int Width;

                public:

                                Hall();

                                Hall(int Length, int Width);
                                void Store();
                                ~Hall();
};

plz correct me if i am wrong

is ko source file mai likhna ya phr project main

source file mei

app ny land transport aur air transport ko transport class say inherit ni kiya tarqi bhai

constructer non parametrize hoga yaha

RSS

Looking For Something? Search Below

Latest Activity

+ ! Agha RoShaaan Khan+ commented on + M.Tariq Malik's page Chit Chat Wall
1 hour ago
+ ! Agha RoShaaan Khan+ replied to Mr Siren Head's discussion Ning Chats
1 hour ago
イム乃ひ posted a video

PERFECT..

5 hours ago
Mr Siren Head commented on + M.Tariq Malik's page Chit Chat Wall
7 hours ago
Mr Siren Head replied to Mr Siren Head's discussion Ning Chats
7 hours ago
Mr Siren Head replied to Mr Siren Head's discussion Ning Chats
7 hours ago
AVAYA replied to Mr Siren Head's discussion Ning Chats
7 hours ago
AVAYA replied to Mr Siren Head's discussion Ning Chats
7 hours ago

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